diff --git a/pkgs/development/python-modules/pypitoken/default.nix b/pkgs/development/python-modules/pypitoken/default.nix new file mode 100644 index 000000000000..90c42306a134 --- /dev/null +++ b/pkgs/development/python-modules/pypitoken/default.nix @@ -0,0 +1,57 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, jsonschema +, poetry-core +, pymacaroons +, pytest-mock +, pytestCheckHook +, pythonOlder +, typing-extensions +}: + +buildPythonPackage rec { + pname = "pypitoken"; + version = "6.0.3"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "ewjoachim"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-1kPIVcxpFjqlAnPh71iS07n9M0qcFrwMRV8k38YxHBc="; + }; + + postPatch = '' + sed -i "/--cov/d" setup.cfg + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + pymacaroons + jsonschema + typing-extensions + ]; + + nativeCheckInputs = [ + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pypitoken" + ]; + + meta = with lib; { + description = "Library for generating and manipulating PyPI tokens"; + homepage = "https://pypitoken.readthedocs.io/"; + changelog = "https://github.com/ewjoachim/pypitoken/releases/tag/6.0.3${version}"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/tools/devpi-client/default.nix b/pkgs/development/tools/devpi-client/default.nix index 27af4acb352b..906711a81386 100644 --- a/pkgs/development/tools/devpi-client/default.nix +++ b/pkgs/development/tools/devpi-client/default.nix @@ -1,32 +1,19 @@ { lib -, argon2-cffi-bindings -, buildPythonApplication -, check-manifest -, devpi-common , devpi-server -, fetchPypi , git , glibcLocales -, mercurial -, mock -, pkginfo -, pluggy -, py -, pytestCheckHook -, setuptools -, sphinx -, tox -, webtest -, wheel +, python3 }: -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "devpi-client"; - version = "5.2.3"; + version = "6.0.3"; - src = fetchPypi { + format = "setuptools"; + + src = python3.pkgs.fetchPypi { inherit pname version; - hash = "sha256-Ni6ybpUTankkkYYcwnKNFKYwmp1MTxOnucPm/TneWOw="; + hash = "sha256-csdQUxnopH+kYtoqdvyXKNW3fGkQNSREJYxjes9Dgi8="; }; postPatch = '' @@ -38,12 +25,16 @@ buildPythonApplication rec { glibcLocales ]; - propagatedBuildInputs = [ + propagatedBuildInputs = with python3.pkgs; [ argon2-cffi-bindings + build check-manifest devpi-common + iniconfig + pep517 pkginfo pluggy + platformdirs py setuptools ]; @@ -51,14 +42,16 @@ buildPythonApplication rec { nativeCheckInputs = [ devpi-server git + ] ++ (with python3.pkgs; [ mercurial mock + pypitoken pytestCheckHook sphinx - tox + virtualenv webtest wheel - ]; + ]); preCheck = '' export HOME=$(mktemp -d); @@ -74,8 +67,9 @@ buildPythonApplication rec { __darwinAllowLocalNetworking = true; meta = with lib; { - homepage = "http://doc.devpi.net"; description = "Client for devpi, a pypi index server and packaging meta tool"; + homepage = "http://doc.devpi.net"; + changelog = "https://github.com/devpi/devpi/blob/client-${version}/client/CHANGELOG"; license = licenses.mit; maintainers = with maintainers; [ lewo makefu ]; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 75a09e7dc79a..11bda7e273a8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8604,6 +8604,8 @@ self: super: with self; { pypiserver = callPackage ../development/python-modules/pypiserver { }; + pypitoken = callPackage ../development/python-modules/pypitoken { }; + pyplaato = callPackage ../development/python-modules/pyplaato { }; pyplatec = callPackage ../development/python-modules/pyplatec { };