python311Packages.packaging: refactor and adopt
Since this package is now used in a widely used hook, I'm adopting this package on behalf of the Python team.
This commit is contained in:
parent
c3b3c463b2
commit
a91bcf877b
1 changed files with 19 additions and 6 deletions
|
@ -1,17 +1,21 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
|
||||
# build-system
|
||||
, flit-core
|
||||
|
||||
# tests
|
||||
, pretend
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
let
|
||||
packaging = buildPythonPackage rec {
|
||||
pname = "packaging";
|
||||
version = "23.2";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
|
@ -29,18 +33,27 @@ let
|
|||
pretend
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"packaging"
|
||||
"packaging.metadata"
|
||||
"packaging.requirements"
|
||||
"packaging.specifiers"
|
||||
"packaging.tags"
|
||||
"packaging.version"
|
||||
];
|
||||
|
||||
# Prevent circular dependency with pytest
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "packaging" ];
|
||||
|
||||
passthru.tests = packaging.overridePythonAttrs (_: { doCheck = true; });
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/pypa/packaging/blob/${version}/CHANGELOG.rst";
|
||||
description = "Core utilities for Python packages";
|
||||
homepage = "https://github.com/pypa/packaging";
|
||||
downloadPage = "https://github.com/pypa/packaging";
|
||||
homepage = "https://packaging.pypa.io/";
|
||||
license = with licenses; [ bsd2 asl20 ];
|
||||
maintainers = with maintainers; [ bennofs ];
|
||||
maintainers = teams.python.members ++ (with maintainers; [ bennofs ]);
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
Loading…
Reference in a new issue