diff --git a/pkgs/development/python-modules/jira/default.nix b/pkgs/development/python-modules/jira/default.nix index a3f790abfc51..c7d8207aa3d9 100644 --- a/pkgs/development/python-modules/jira/default.nix +++ b/pkgs/development/python-modules/jira/default.nix @@ -1,34 +1,56 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k -, pytest, pytest-runner, pbr, glibcLocales , pytest-cov -, requests, requests_oauthlib, requests-toolbelt, defusedxml -, ipython +{ lib +, buildPythonPackage +, fetchFromGitHub +, defusedxml +, flaky +, keyring +, requests-mock +, requests_oauthlib +, requests-toolbelt +, setuptools-scm +, setuptools-scm-git-archive +, pytestCheckHook }: buildPythonPackage rec { pname = "jira"; - version = "2.0.0"; + version = "3.0.1"; - PBR_VERSION = version; - - src = fetchPypi { - inherit pname version; - sha256 = "e2a94adff98e45b29ded030adc76103eab34fa7d4d57303f211f572bedba0e93"; + src = fetchFromGitHub { + owner = "pycontribs"; + repo = pname; + rev = version; + sha256 = "sha256-hAUAzkHPXFDlKEom+dkzr8GQ+sqK2Ci1/k+QuSNvifE="; }; - buildInputs = [ glibcLocales pytest pytest-cov pytest-runner pbr ]; - propagatedBuildInputs = [ requests requests_oauthlib requests-toolbelt defusedxml pbr ipython ]; + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--cov-report=xml --cov jira" "" + ''; + + nativeBuildInputs = [ setuptools-scm setuptools-scm-git-archive ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + propagatedBuildInputs = [ + defusedxml + keyring + requests_oauthlib + requests-toolbelt + ]; + + checkInputs = [ + flaky + pytestCheckHook + requests-mock + ]; # impure tests because of connectivity attempts to jira servers doCheck = false; - patches = [ ./sphinx-fix.patch ]; - - LC_ALL = "en_US.utf8"; - - disabled = !isPy3k; - meta = with lib; { description = "This library eases the use of the JIRA REST API from Python."; + homepage = "https://github.com/pycontribs/jira"; license = licenses.bsd2; maintainers = with maintainers; [ globin ]; }; diff --git a/pkgs/development/python-modules/jira/sphinx-fix.patch b/pkgs/development/python-modules/jira/sphinx-fix.patch deleted file mode 100644 index ccc47ac4b9cf..000000000000 --- a/pkgs/development/python-modules/jira/sphinx-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ -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)