diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/configparser')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/configparser/0001-namespace-fix.patch | 42 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/configparser/default.nix | 24 |
2 files changed, 66 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/configparser/0001-namespace-fix.patch b/nixpkgs/pkgs/development/python-modules/configparser/0001-namespace-fix.patch new file mode 100644 index 000000000000..05dbf4677182 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/configparser/0001-namespace-fix.patch @@ -0,0 +1,42 @@ +From daae1ae35e13bc8107dc97d9219dfb8e172d5d2a Mon Sep 17 00:00:00 2001 +From: Frederik Rietdijk <fridh@fridh.nl> +Date: Tue, 14 Mar 2017 15:00:33 +0100 +Subject: [PATCH] namespace fix + +configparser broke other namespace packages +https://github.com/NixOS/nixpkgs/issues/23855#issuecomment-286427428 +This patch seems to solve that issue. +--- + setup.py | 1 - + src/backports/__init__.py | 6 ------ + 2 files changed, 7 deletions(-) + +diff --git a/setup.py b/setup.py +index 3b07823..63ed25d 100644 +--- a/setup.py ++++ b/setup.py +@@ -42,7 +42,6 @@ setup( + py_modules=modules, + package_dir={'': 'src'}, + packages=find_packages('src'), +- namespace_packages=['backports'], + include_package_data=True, + zip_safe=False, + install_requires=requirements, +diff --git a/src/backports/__init__.py b/src/backports/__init__.py +index f84d25c..febdb2f 100644 +--- a/src/backports/__init__.py ++++ b/src/backports/__init__.py +@@ -3,9 +3,3 @@ + + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) +- +-try: +- import pkg_resources +- pkg_resources.declare_namespace(__name__) +-except ImportError: +- pass +-- +2.11.1 + diff --git a/nixpkgs/pkgs/development/python-modules/configparser/default.nix b/nixpkgs/pkgs/development/python-modules/configparser/default.nix new file mode 100644 index 000000000000..93b5e58a7745 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/configparser/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "configparser"; + version = "3.7.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "27594cf4fc279f321974061ac69164aaebd2749af962ac8686b20503ac0bcf2d"; + }; + + # No tests available + doCheck = false; + + preConfigure = '' + export LC_ALL=${if stdenv.isDarwin then "en_US" else "C"}.UTF-8 + ''; + + meta = with stdenv.lib; { + description = "Updated configparser from Python 3.7 for Python 2.6+."; + license = licenses.mit; + homepage = https://github.com/jaraco/configparser; + }; +} |