summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-06-03 22:11:29 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-06-03 22:11:29 +0200
commita47d34cebe37e80329c2ce551c3f895b2b5f3e58 (patch)
treee712e106e6cf79d42ce99b785db5ce38b180df4b /pkgs/development/python-modules
parentca11e5acfaedfdfd10de8c537ca10233061831b5 (diff)
downloadnixlib-a47d34cebe37e80329c2ce551c3f895b2b5f3e58.tar
nixlib-a47d34cebe37e80329c2ce551c3f895b2b5f3e58.tar.gz
nixlib-a47d34cebe37e80329c2ce551c3f895b2b5f3e58.tar.bz2
nixlib-a47d34cebe37e80329c2ce551c3f895b2b5f3e58.tar.lz
nixlib-a47d34cebe37e80329c2ce551c3f895b2b5f3e58.tar.xz
nixlib-a47d34cebe37e80329c2ce551c3f895b2b5f3e58.tar.zst
nixlib-a47d34cebe37e80329c2ce551c3f895b2b5f3e58.zip
pythonPackages.jira: fix build (#41419)
The build for `pythonPackages.jira` failed with the following error:

```
Download error on https://pypi.python.org/simple/sphinx/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'sphinx' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for sphinx>=1.6.5
Traceback (most recent call last):
  ...
  File "/nix/store/bp4dillg6xxblpf00v8d9nxfx3bnggfy-python3.6-bootstrapped-pip-10.0.1/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 667, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('sphinx>=1.6.5')
builder for '/nix/store/8dv7mpspyk6kxwnzqb43rzm4q5j14xp0-python3.6-jira-1.0.15.drv' failed with exit code 1
```

The root issue is most likely caused by some docs fixes upstream
(https://github.com/pycontribs/jira/commit/519183d874fde26e676a75aa53496968643aaac0)
which were released in 1.0.15. The bump (without the fix) has been
performed in 7a6bf668fb73cd4d1096fa1c0162d9c6009f1d7e. Since `sphinx`
isn't needed during runtime, it's not necessary to use it as
`propagatedBuildInput`. In order to work around this the dependency had
to be removed from from `setup.py`.

See https://hydra.nixos.org/build/75004048 for further reference
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/jira/default.nix18
-rw-r--r--pkgs/development/python-modules/jira/sphinx-fix.patch11
2 files changed, 23 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/jira/default.nix b/pkgs/development/python-modules/jira/default.nix
index 2a1abe7b59ce..ac4f45f4e9d3 100644
--- a/pkgs/development/python-modules/jira/default.nix
+++ b/pkgs/development/python-modules/jira/default.nix
@@ -1,29 +1,35 @@
 { lib, buildPythonPackage, fetchPypi, isPy3k
 , pytest, pytestrunner, pbr, glibcLocales , pytestcov
-, requests, requests_oauthlib, requests_toolbelt, defusedxml }:
+, requests, requests_oauthlib, requests_toolbelt, defusedxml
+, ipython
+}:
 
 buildPythonPackage rec {
   pname = "jira";
   version = "1.0.15";
 
+  PBR_VERSION = version;
+
   src = fetchPypi {
     inherit pname version;
     sha256 = "20108a1d5b0dd058d5d4e0047f2d09ee06aaa413b22ca4d5c249e86167417fe8";
   };
 
   buildInputs = [ glibcLocales pytest pytestcov pytestrunner pbr ];
-  propagatedBuildInputs = [ requests requests_oauthlib requests_toolbelt defusedxml ];
+  propagatedBuildInputs = [ requests requests_oauthlib requests_toolbelt defusedxml pbr ipython ];
+
+  # impure tests because of connectivity attempts to jira servers
+  doCheck = false;
+
+  patches = [ ./sphinx-fix.patch ];
 
   LC_ALL = "en_US.utf8";
 
   disabled = !isPy3k;
 
-  # no tests in release tarball
-  doCheck = false;
-
   meta = with lib; {
     description = "This library eases the use of the JIRA REST API from Python.";
     license = licenses.bsd2;
-    maintainers = with maintainers; [ globin ];
+    maintainers = with maintainers; [ globin ma27 ];
   };
 }
diff --git a/pkgs/development/python-modules/jira/sphinx-fix.patch b/pkgs/development/python-modules/jira/sphinx-fix.patch
new file mode 100644
index 000000000000..ccc47ac4b9cf
--- /dev/null
+++ b/pkgs/development/python-modules/jira/sphinx-fix.patch
@@ -0,0 +1,11 @@
+diff --git a/setup.py b/setup.py
+index c49a24d..31aeec2 100644
+--- a/setup.py
++++ b/setup.py
+@@ -11,5 +11,5 @@ except ImportError:
+ 
+ 
+ setuptools.setup(
+-    setup_requires=['pbr>=3.0.0', 'setuptools>=17.1', 'pytest-runner', 'sphinx>=1.6.5'],
++    setup_requires=['pbr>=3.0.0', 'setuptools>=17.1', 'pytest-runner'],
+     pbr=True)