···11+{
22+ buildPythonPackage,
33+ fetchPypi,
44+ lib,
55+ cssselect,
66+ chardet,
77+ lxml,
88+ pdfminer-six,
99+ pyquery,
1010+ roman,
1111+ six,
1212+ setuptools,
1313+}:
1414+1515+buildPythonPackage rec {
1616+ pname = "pdfquery";
1717+ version = "0.4.3";
1818+ pyproject = true;
1919+2020+ # The latest version is on PyPI but not tagged on GitHub
2121+ src = fetchPypi {
2222+ inherit pname version;
2323+ hash = "sha256-oqKXTLMS/aT1aa3I1jN30l1cY2ckC0p7+xZTksc+Hc4=";
2424+ };
2525+2626+ dependencies = [
2727+ cssselect
2828+ chardet
2929+ lxml
3030+ pdfminer-six
3131+ pyquery
3232+ roman
3333+3434+ # Not explicitly listed in setup.py; found through trial and error
3535+ six
3636+ ];
3737+3838+ build-system = [
3939+ setuptools
4040+ ];
4141+4242+ # Although this package has tests, they aren't runnable with
4343+ # `unittestCheckHook` or `pytestCheckHook` because you're meant
4444+ # to run the tests with `python setup.py test`, but that's deprecated
4545+ # and doesn't work anymore. So there are no runnable tests.
4646+ doCheck = false;
4747+4848+ # This runs as a different phase than checkPhase, so still runs
4949+ # despite `doCheck = false`
5050+ pythonImportsCheck = [
5151+ "pdfquery"
5252+ ];
5353+5454+ meta = {
5555+ description = "Concise, friendly PDF scraping using JQuery or XPath syntax";
5656+ homepage = "https://github.com/jcushman/pdfquery";
5757+ license = lib.licenses.mit;
5858+ maintainers = [ lib.maintainers.samasaur ];
5959+ };
6060+}