94427deb9d
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
91 lines
1.8 KiB
Nix
91 lines
1.8 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, flit-core
|
|
, filelock
|
|
, packaging
|
|
, pyproject-hooks
|
|
, pytest-mock
|
|
, pytest-rerunfailures
|
|
, pytest-xdist
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, setuptools
|
|
, toml
|
|
, tomli
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "build";
|
|
version = "0.10.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pypa";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-kXFrfTb7+68EV+gSENL81IFSR+ue7Fl6R2gsuFFBJhI=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
flit-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
packaging
|
|
pyproject-hooks
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
tomli
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
filelock
|
|
pytest-mock
|
|
pytest-rerunfailures
|
|
pytest-xdist
|
|
pytestCheckHook
|
|
setuptools
|
|
toml
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"-W"
|
|
"ignore::DeprecationWarning"
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
disabledTests = [
|
|
# Tests often fail with StopIteration
|
|
"test_isolat"
|
|
"test_default_pip_is_never_too_old"
|
|
"test_build"
|
|
"test_with_get_requires"
|
|
"test_init"
|
|
"test_output"
|
|
"test_wheel_metadata"
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
# Expects Apple's Python and its quirks
|
|
"test_can_get_venv_paths_with_conflicting_default_scheme"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"build"
|
|
];
|
|
|
|
meta = with lib; {
|
|
mainProgram = "pyproject-build";
|
|
description = "Simple, correct PEP517 package builder";
|
|
longDescription = ''
|
|
build will invoke the PEP 517 hooks to build a distribution package. It
|
|
is a simple build tool and does not perform any dependency management.
|
|
'';
|
|
homepage = "https://github.com/pypa/build";
|
|
changelog = "https://github.com/pypa/build/blob/${version}/CHANGELOG.rst";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|