diff --git a/pkgs/development/python-modules/cachecontrol/default.nix b/pkgs/development/python-modules/cachecontrol/default.nix index 225ee7efd010..61ed10390bd5 100644 --- a/pkgs/development/python-modules/cachecontrol/default.nix +++ b/pkgs/development/python-modules/cachecontrol/default.nix @@ -2,7 +2,8 @@ , buildPythonPackage , cherrypy , fetchFromGitHub -, lockfile +, flit-core +, filelock , mock , msgpack , pytestCheckHook @@ -13,8 +14,8 @@ buildPythonPackage rec { pname = "cachecontrol"; - version = "0.12.11"; - format = "setuptools"; + version = "0.13.1"; + format = "pyproject"; disabled = pythonOlder "3.6"; @@ -23,8 +24,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "ionrock"; repo = pname; - rev = "v${version}"; - hash = "sha256-uUPIQz/n347Q9G7NDOGuB760B/KxOglUxiS/rYjt5Po="; + rev = "refs/tags/v${version}"; + hash = "sha256-4N+vk65WxOrT+IJRn+lEnbs5vlWQh9ievVHWWe3BKJ0="; }; postPatch = '' @@ -34,29 +35,39 @@ buildPythonPackage rec { "urllib3.response.HTTPResponse.from_httplib" ''; + nativeBuildInputs = [ + flit-core + ]; + propagatedBuildInputs = [ msgpack requests ]; + passthru.optional-dependencies = { + filecache = [ + filelock + ]; + redis = [ + redis + ]; + }; + nativeCheckInputs = [ cherrypy mock pytestCheckHook - ] ++ passthru.optional-dependencies.filecache; + requests + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); pythonImportsCheck = [ "cachecontrol" ]; - passthru.optional-dependencies = { - filecache = [ lockfile ]; - redis = [ redis ]; - }; - meta = with lib; { description = "Httplib2 caching for requests"; homepage = "https://github.com/ionrock/cachecontrol"; + changelog = "https://github.com/psf/cachecontrol/releases/tag/v${version}"; license = licenses.asl20; maintainers = with maintainers; [ costrouc ]; }; diff --git a/pkgs/development/tools/pip-audit/default.nix b/pkgs/development/tools/pip-audit/default.nix index b14f35a62583..a7d7d8c8c58e 100644 --- a/pkgs/development/tools/pip-audit/default.nix +++ b/pkgs/development/tools/pip-audit/default.nix @@ -2,41 +2,24 @@ , fetchFromGitHub , python3 }: -let - py = python3.override { - packageOverrides = self: super: { - cyclonedx-python-lib = super.cyclonedx-python-lib.overridePythonAttrs (oldAttrs: rec { - version = "2.7.1"; - src = fetchFromGitHub { - owner = "CycloneDX"; - repo = "cyclonedx-python-lib"; - rev = "v${version}"; - hash = "sha256-c/KhoJOa121/h0n0GUazjUFChnUo05ThD+fuZXc5/Pk="; - }; - }); - }; - }; -in -with py.pkgs; - -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "pip-audit"; - version = "2.5.6"; + version = "2.6.0"; format = "pyproject"; src = fetchFromGitHub { owner = "trailofbits"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-hpzJtKtvhudT7OzZnuv6LbnMHnHIBYmQsAR1oRglvT0="; + hash = "sha256-Ja3LPKfrqs1evNzjOJ3oxh2vxqw8oZJDIsyZGT0q3PY="; }; - nativeBuildInputs = [ + nativeBuildInputs = with python3.pkgs; [ flit-core ]; - propagatedBuildInputs = [ + propagatedBuildInputs = with python3.pkgs; [ cachecontrol cyclonedx-python-lib html5lib @@ -47,7 +30,7 @@ buildPythonApplication rec { toml ] ++ cachecontrol.optional-dependencies.filecache; - nativeCheckInputs = [ + nativeCheckInputs = with python3.pkgs; [ pretend pytestCheckHook ];