From 1a012f3fa7e9e9cb8f40d1e400f7cc90584e1a6e Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 11 Jun 2020 12:07:46 +0200 Subject: [PATCH] python2.pkgs.soupsieve: keep 1.9.6 for python 2 --- .../python-modules/soupsieve/1.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 5 ++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/soupsieve/1.nix diff --git a/pkgs/development/python-modules/soupsieve/1.nix b/pkgs/development/python-modules/soupsieve/1.nix new file mode 100644 index 000000000000..bb5ecbc839c2 --- /dev/null +++ b/pkgs/development/python-modules/soupsieve/1.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, beautifulsoup4 +, isPy3k +, backports_functools_lru_cache +}: + +buildPythonPackage rec { + pname = "soupsieve"; + version = "1.9.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "7985bacc98c34923a439967c1a602dc4f1e15f923b6fcf02344184f86cc7efaa"; + }; + + checkPhase = '' + py.test + ''; + + checkInputs = [ pytest beautifulsoup4 ]; + + propagatedBuildInputs = lib.optional (!isPy3k) backports_functools_lru_cache; + + # Circular test dependency on beautifulsoup4 + doCheck = false; + + meta = { + description = "A CSS4 selector implementation for Beautiful Soup"; + license = lib.licenses.mit; + homepage = "https://github.com/facelessuser/soupsieve"; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e64626faaaf8..d30076e2a23c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6349,7 +6349,10 @@ in { sorl_thumbnail = callPackage ../development/python-modules/sorl_thumbnail { }; - soupsieve = callPackage ../development/python-modules/soupsieve { }; + soupsieve = if isPy3k then + callPackage ../development/python-modules/soupsieve { } + else + callPackage ../development/python-modules/soupsieve/1.nix { }; sphinx_rtd_theme = callPackage ../development/python-modules/sphinx_rtd_theme { };