at 18.03-beta 1.5 kB view raw
1{ buildPythonPackage, fetchurl, glibcLocales, mock, pytest, botocore, 2 testfixtures, pillow, six, twisted, w3lib, lxml, queuelib, pyopenssl, 3 service-identity, parsel, pydispatcher, cssselect, lib }: 4buildPythonPackage rec { 5 version = "1.5.0"; 6 pname = "Scrapy"; 7 name = "${pname}-${version}"; 8 9 buildInputs = [ glibcLocales mock pytest botocore testfixtures pillow ]; 10 propagatedBuildInputs = [ 11 six twisted w3lib lxml cssselect queuelib pyopenssl service-identity parsel pydispatcher 12 ]; 13 14 # Scrapy is usually installed via pip where copying all 15 # permissions makes sense. In Nix the files copied are owned by 16 # root and readonly. As a consequence scrapy can't edit the 17 # project templates. 18 patches = [ ./permissions-fix.patch ]; 19 20 LC_ALL="en_US.UTF-8"; 21 22 checkPhase = '' 23 py.test --ignore=tests/test_linkextractors_deprecated.py --ignore=tests/test_proxy_connect.py 24 # The ignored tests require mitmproxy, which depends on protobuf, but it's disabled on Python3 25 ''; 26 27 src = fetchurl { 28 url = "mirror://pypi/S/Scrapy/${name}.tar.gz"; 29 sha256 = "31a0bf05d43198afaf3acfb9b4fb0c09c1d7d7ff641e58c66e36117f26c4b755"; 30 }; 31 32 meta = with lib; { 33 description = "A fast high-level web crawling and web scraping framework, used to crawl websites and extract structured data from their pages"; 34 homepage = http://scrapy.org/; 35 license = licenses.bsd3; 36 maintainers = with maintainers; [ drewkett ]; 37 platforms = platforms.linux; 38 }; 39}