1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pythonOlder, 6 7 # build-system 8 flit-core, 9 10 # tests 11 pretend, 12 pytestCheckHook, 13}: 14 15let 16 packaging = buildPythonPackage rec { 17 pname = "packaging"; 18 version = "25.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchPypi { 24 inherit pname version; 25 hash = "sha256-1EOHLJjWd79g9qHy+MHLdI6P52LSv50xSLVZkpWw/E8="; 26 }; 27 28 nativeBuildInputs = [ flit-core ]; 29 30 nativeCheckInputs = [ 31 pytestCheckHook 32 pretend 33 ]; 34 35 pythonImportsCheck = [ 36 "packaging" 37 "packaging.metadata" 38 "packaging.requirements" 39 "packaging.specifiers" 40 "packaging.tags" 41 "packaging.version" 42 ]; 43 44 # Prevent circular dependency with pytest 45 doCheck = false; 46 47 passthru.tests = packaging.overridePythonAttrs (_: { 48 doCheck = true; 49 }); 50 51 meta = with lib; { 52 changelog = "https://github.com/pypa/packaging/blob/${version}/CHANGELOG.rst"; 53 description = "Core utilities for Python packages"; 54 downloadPage = "https://github.com/pypa/packaging"; 55 homepage = "https://packaging.pypa.io/"; 56 license = with licenses; [ 57 bsd2 58 asl20 59 ]; 60 maintainers = with maintainers; [ bennofs ]; 61 teams = [ teams.python ]; 62 }; 63 }; 64in 65packaging