nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 87 lines 1.7 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, filelock 6, flit-core 7, importlib-metadata 8, packaging 9, pep517 10, pytest-mock 11, pytest-rerunfailures 12, pytest-xdist 13, pytestCheckHook 14, pythonOlder 15, toml 16, tomli 17}: 18 19buildPythonPackage rec { 20 pname = "build"; 21 version = "0.7.0"; 22 format = "pyproject"; 23 24 disabled = pythonOlder "3.6"; 25 26 src = fetchFromGitHub { 27 owner = "pypa"; 28 repo = pname; 29 rev = version; 30 sha256 = "sha256-kT3Gax/ZCeV8Kb7CBArGWn/qzVSVdMRUoid/8cAovnE="; 31 }; 32 33 nativeBuildInputs = [ 34 flit-core 35 ]; 36 37 propagatedBuildInputs = [ 38 packaging 39 pep517 40 tomli 41 ] ++ lib.optionals (pythonOlder "3.8") [ 42 importlib-metadata 43 ]; 44 45 checkInputs = [ 46 filelock 47 toml 48 pytest-mock 49 pytest-rerunfailures 50 pytest-xdist 51 pytestCheckHook 52 ]; 53 54 pytestFlagsArray = [ 55 "-W" 56 "ignore::DeprecationWarning" 57 ]; 58 59 disabledTests = [ 60 # Tests often fail with StopIteration 61 "test_isolat" 62 "test_default_pip_is_never_too_old" 63 "test_build" 64 "test_with_get_requires" 65 "test_init" 66 "test_output" 67 "test_wheel_metadata" 68 ] ++ lib.optionals stdenv.isDarwin [ 69 # Expects Apple's Python and its quirks 70 "test_can_get_venv_paths_with_conflicting_default_scheme" 71 ]; 72 73 pythonImportsCheck = [ 74 "build" 75 ]; 76 77 meta = with lib; { 78 description = "Simple, correct PEP517 package builder"; 79 longDescription = '' 80 build will invoke the PEP 517 hooks to build a distribution package. It 81 is a simple build tool and does not perform any dependency management. 82 ''; 83 homepage = "https://github.com/pypa/build"; 84 license = licenses.mit; 85 maintainers = with maintainers; [ fab ]; 86 }; 87}