at 22.05-pre 1.5 kB view raw
1{ lib, buildPythonPackage, fetchPypi, isPy27 2, Babel 3, cssselect 4, python-dateutil 5, feedparser 6, futures ? null 7, gdata 8, gnupg 9, google-api-python-client 10, html2text 11, libyaml 12, lxml 13, mechanize 14, nose 15, pdfminer 16, pillow 17, prettytable 18, pyqt5 19, pyyaml 20, requests 21, simplejson 22, termcolor 23, unidecode 24}: 25 26buildPythonPackage rec { 27 pname = "weboob"; 28 version = "2.0"; 29 30 src = fetchPypi { 31 inherit pname version; 32 sha256 = "1c69vzf8sg8471lcaafpz9iw2q3rfj5hmcpqrs2k59fkgbvy32zw"; 33 }; 34 35 postPatch = '' 36 # Disable doctests that require networking: 37 sed -i -n -e '/^ *def \+pagination *(.*: *$/ { 38 p; n; p; /"""\|'\'\'\'''/!b 39 40 :loop 41 n; /^ *\(>>>\|\.\.\.\)/ { h; bloop } 42 x; /^ *\(>>>\|\.\.\.\)/bloop; x 43 p; /"""\|'\'\'\'''/b 44 bloop 45 }; p' weboob/browser/browsers.py weboob/browser/pages.py 46 ''; 47 48 checkInputs = [ nose ]; 49 50 nativeBuildInputs = [ pyqt5 ]; 51 52 propagatedBuildInputs = [ 53 Babel 54 cssselect 55 python-dateutil 56 feedparser 57 gdata 58 gnupg 59 google-api-python-client 60 html2text 61 libyaml 62 lxml 63 mechanize 64 pdfminer 65 pillow 66 prettytable 67 pyqt5 68 pyyaml 69 requests 70 simplejson 71 termcolor 72 unidecode 73 ] ++ lib.optionals isPy27 [ futures ]; 74 75 checkPhase = '' 76 nosetests 77 ''; 78 79 meta = { 80 homepage = "http://weboob.org"; 81 description = "Collection of applications and APIs to interact with websites without requiring the user to open a browser"; 82 license = lib.licenses.agpl3; 83 }; 84}