nixpkgs/pkgs/development/python-modules/packaging/default.nix
Martin Weinelt 2c68d6b029
python311Packages.packaging: 23.2 -> 24.0
https://github.com/pypa/packaging/blob/24.0/CHANGELOG.rst

The `requires_dist` field now defaults to `None`, if the package does
not specify any requirements.
2024-03-22 16:34:52 +01:00

61 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
# build-system
, flit-core
# tests
, pretend
, pytestCheckHook
}:
let
packaging = buildPythonPackage rec {
pname = "packaging";
version = "24.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-64LF4+ViCQdHZuaIW7BLjDigwBXQowA26+fs40yZiek=";
};
nativeBuildInputs = [
flit-core
];
nativeCheckInputs = [
pytestCheckHook
pretend
];
pythonImportsCheck = [
"packaging"
"packaging.metadata"
"packaging.requirements"
"packaging.specifiers"
"packaging.tags"
"packaging.version"
];
# Prevent circular dependency with pytest
doCheck = false;
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";
downloadPage = "https://github.com/pypa/packaging";
homepage = "https://packaging.pypa.io/";
license = with licenses; [ bsd2 asl20 ];
maintainers = teams.python.members ++ (with maintainers; [ bennofs ]);
};
};
in
packaging