From eb19c37b7065ea8ff4577f3f66a40f31826ab9ac Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 1 Jul 2020 04:20:00 -0500 Subject: [PATCH 1/2] pythonPackages.itemadapter: init at 0.1.0 --- .../python-modules/itemadapter/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/itemadapter/default.nix diff --git a/pkgs/development/python-modules/itemadapter/default.nix b/pkgs/development/python-modules/itemadapter/default.nix new file mode 100644 index 000000000000..92cc794dc2f2 --- /dev/null +++ b/pkgs/development/python-modules/itemadapter/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchPypi, isPy27 }: + +buildPythonPackage rec { + pname = "itemadapter"; + version = "0.1.0"; + + disabled = isPy27; + + src = fetchPypi { + inherit pname version; + sha256 = "52159b4f97d82aa2968000ee8371b2114af56a2f44e4cd9142580d46eea39020"; + }; + + doCheck = false; # infinite recursion with Scrapy + + pythonImportsCheck = [ "itemadapter" ]; + + meta = with lib; { + description = "Common interface for data container classes"; + homepage = "https://github.com/scrapy/itemadapter"; + license = licenses.bsd3; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ebf2585bfffe..d35c632174c4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -886,6 +886,8 @@ in { itanium_demangler = callPackage ../development/python-modules/itanium_demangler { }; + itemadapter = callPackage ../development/python-modules/itemadapter { }; + iterm2 = callPackage ../development/python-modules/iterm2 { }; janus = callPackage ../development/python-modules/janus { }; From 8d1a3c78c437815c0659ac47647c22ef4553b750 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 1 Jul 2020 04:21:00 -0500 Subject: [PATCH 2/2] pythonPackages.scrapy: 2.1.0 -> 2.2.1 Changelog: + https://github.com/scrapy/scrapy/releases/tag/2.2.0 + https://github.com/scrapy/scrapy/releases/tag/2.2.1 --- .../python-modules/scrapy/default.nix | 14 ++++------- .../scrapy/permissions-fix.patch | 23 ------------------- 2 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 pkgs/development/python-modules/scrapy/permissions-fix.patch diff --git a/pkgs/development/python-modules/scrapy/default.nix b/pkgs/development/python-modules/scrapy/default.nix index 2827f7151f4d..177531e64f77 100644 --- a/pkgs/development/python-modules/scrapy/default.nix +++ b/pkgs/development/python-modules/scrapy/default.nix @@ -23,10 +23,11 @@ , sybil , pytest-twisted , botocore +, itemadapter }: buildPythonPackage rec { - version = "2.1.0"; + version = "2.2.1"; pname = "Scrapy"; disabled = isPy27; @@ -55,14 +56,7 @@ buildPythonPackage rec { w3lib zope_interface protego - ]; - - patches = [ - # Scrapy is usually installed via pip where copying all - # permissions makes sense. In Nix the files copied are owned by - # root and readonly. As a consequence scrapy can't edit the - # project templates. - ./permissions-fix.patch + itemadapter ]; LC_ALL = "en_US.UTF-8"; @@ -78,7 +72,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "640aea0f9be9b055f5cfec5ab78ee88bb37a5be3809b138329bd2af51392ec7f"; + sha256 = "6a09beb5190bfdee2d72cf261822eae5d92fe8a86ac9ee1f55fc44b4864ca583"; }; postInstall = '' diff --git a/pkgs/development/python-modules/scrapy/permissions-fix.patch b/pkgs/development/python-modules/scrapy/permissions-fix.patch deleted file mode 100644 index 53038cf74e5f..000000000000 --- a/pkgs/development/python-modules/scrapy/permissions-fix.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/scrapy/commands/startproject.py b/scrapy/commands/startproject.py -index 5941066..89f8edb 100644 ---- a/scrapy/commands/startproject.py -+++ b/scrapy/commands/startproject.py -@@ -4,7 +4,7 @@ import os - import string - from importlib import import_module - from os.path import join, exists, abspath --from shutil import ignore_patterns, move, copy2, copystat -+from shutil import ignore_patterns, move, copyfile, copystat - - import scrapy - from scrapy.commands import ScrapyCommand -@@ -76,8 +76,7 @@ class Command(ScrapyCommand): - if os.path.isdir(srcname): - self._copytree(srcname, dstname) - else: -- copy2(srcname, dstname) -- copystat(src, dst) -+ copyfile(srcname, dstname) - - def run(self, args, opts): - if len(args) not in (1, 2):