diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/ssdp/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/ssdp/default.nix | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/ssdp/default.nix b/nixpkgs/pkgs/development/python-modules/ssdp/default.nix index ac39cffa393e..bd73a6abaead 100644 --- a/nixpkgs/pkgs/development/python-modules/ssdp/default.nix +++ b/nixpkgs/pkgs/development/python-modules/ssdp/default.nix @@ -1,31 +1,51 @@ { lib , buildPythonPackage -, fetchPypi -, isPy27 +, fetchFromGitHub , pbr -, pytest -, isPy3k +, pytestCheckHook +, pythonOlder +, setuptools-scm }: buildPythonPackage rec { pname = "ssdp"; - version = "1.0.1"; - disabled = !isPy3k; + version = "1.1.0"; - src = fetchPypi { - inherit pname version; - sha256 = "0yhjqs9jyvwmba8fi72xfi9k8pxy11wkz4iywayrg71ka3la49bk"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "codingjoe"; + repo = pname; + rev = version; + sha256 = "19d2b5frpq2qkfkpz173wpjk5jwhkjpk75p8q92nm8iv41nrzljy"; }; - buildInputs = [ pbr ]; - checkInputs = [ pytest ]; + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools-scm + ]; + + buildInputs = [ + pbr + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "pytest-runner" "" \ + --replace "--cov=ssdp" "" + ''; - # test suite uses new async primitives - doCheck = !isPy27; + pythonImportsCheck = [ "ssdp" ]; meta = with lib; { + description = "Python asyncio library for Simple Service Discovery Protocol (SSDP)"; homepage = "https://github.com/codingjoe/ssdp"; - description = "Python asyncio library for Simple Service Discovery Protocol (SSDP)."; license = licenses.mit; + maintainers = with maintainers; [ fab ]; }; } |