···1+{
2+ buildPythonPackage,
3+ fetchPypi,
4+ lib,
5+ cssselect,
6+ chardet,
7+ lxml,
8+ pdfminer-six,
9+ pyquery,
10+ roman,
11+ six,
12+ setuptools,
13+}:
14+15+buildPythonPackage rec {
16+ pname = "pdfquery";
17+ version = "0.4.3";
18+ pyproject = true;
19+20+ # The latest version is on PyPI but not tagged on GitHub
21+ src = fetchPypi {
22+ inherit pname version;
23+ hash = "sha256-oqKXTLMS/aT1aa3I1jN30l1cY2ckC0p7+xZTksc+Hc4=";
24+ };
25+26+ dependencies = [
27+ cssselect
28+ chardet
29+ lxml
30+ pdfminer-six
31+ pyquery
32+ roman
33+34+ # Not explicitly listed in setup.py; found through trial and error
35+ six
36+ ];
37+38+ build-system = [
39+ setuptools
40+ ];
41+42+ # Although this package has tests, they aren't runnable with
43+ # `unittestCheckHook` or `pytestCheckHook` because you're meant
44+ # to run the tests with `python setup.py test`, but that's deprecated
45+ # and doesn't work anymore. So there are no runnable tests.
46+ doCheck = false;
47+48+ # This runs as a different phase than checkPhase, so still runs
49+ # despite `doCheck = false`
50+ pythonImportsCheck = [
51+ "pdfquery"
52+ ];
53+54+ meta = {
55+ description = "Concise, friendly PDF scraping using JQuery or XPath syntax";
56+ homepage = "https://github.com/jcushman/pdfquery";
57+ license = lib.licenses.mit;
58+ maintainers = [ lib.maintainers.samasaur ];
59+ };
60+}