2020-06-11 09:36:29 +00:00
|
|
|
{ lib
|
2021-11-13 15:20:20 +00:00
|
|
|
, stdenv
|
2020-06-11 09:36:29 +00:00
|
|
|
, buildPythonPackage
|
2021-07-02 22:28:25 +00:00
|
|
|
, fetchFromGitHub
|
2023-02-26 11:44:01 +00:00
|
|
|
, flit-core
|
2021-03-03 10:00:51 +00:00
|
|
|
, filelock
|
|
|
|
, packaging
|
2023-02-26 11:44:01 +00:00
|
|
|
, pyproject-hooks
|
2021-03-03 10:00:51 +00:00
|
|
|
, pytest-mock
|
2021-07-02 22:28:25 +00:00
|
|
|
, pytest-rerunfailures
|
2021-03-03 10:00:51 +00:00
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
2020-06-11 09:36:29 +00:00
|
|
|
, pythonOlder
|
2022-09-15 14:25:00 +00:00
|
|
|
, setuptools
|
2021-03-03 10:00:51 +00:00
|
|
|
, toml
|
2021-12-03 10:28:51 +00:00
|
|
|
, tomli
|
2020-06-11 09:36:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "build";
|
2023-02-26 11:44:01 +00:00
|
|
|
version = "0.10.0";
|
2020-06-11 09:36:29 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-12-03 10:28:51 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2021-07-02 22:28:25 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pypa";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-02-26 11:44:01 +00:00
|
|
|
hash = "sha256-kXFrfTb7+68EV+gSENL81IFSR+ue7Fl6R2gsuFFBJhI=";
|
2020-06-11 09:36:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-02-26 11:44:01 +00:00
|
|
|
flit-core
|
2020-06-11 09:36:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
packaging
|
2023-02-26 11:44:01 +00:00
|
|
|
pyproject-hooks
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
2021-12-03 10:28:51 +00:00
|
|
|
tomli
|
2020-06-11 09:36:29 +00:00
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-03 10:00:51 +00:00
|
|
|
filelock
|
|
|
|
pytest-mock
|
2021-07-02 22:28:25 +00:00
|
|
|
pytest-rerunfailures
|
2021-03-03 10:00:51 +00:00
|
|
|
pytest-xdist
|
2021-07-02 22:28:25 +00:00
|
|
|
pytestCheckHook
|
2023-02-26 11:44:01 +00:00
|
|
|
setuptools
|
|
|
|
toml
|
2021-03-03 10:00:51 +00:00
|
|
|
];
|
|
|
|
|
2021-12-03 10:28:51 +00:00
|
|
|
pytestFlagsArray = [
|
2022-01-17 08:09:44 +00:00
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
2021-12-03 10:28:51 +00:00
|
|
|
];
|
|
|
|
|
2023-02-01 23:30:56 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-03-03 10:00:51 +00:00
|
|
|
disabledTests = [
|
2021-12-03 10:28:51 +00:00
|
|
|
# Tests often fail with StopIteration
|
|
|
|
"test_isolat"
|
2021-03-03 10:00:51 +00:00
|
|
|
"test_default_pip_is_never_too_old"
|
2021-07-02 22:28:25 +00:00
|
|
|
"test_build"
|
2021-12-03 10:28:51 +00:00
|
|
|
"test_with_get_requires"
|
2021-07-02 22:28:25 +00:00
|
|
|
"test_init"
|
2021-12-03 10:28:51 +00:00
|
|
|
"test_output"
|
|
|
|
"test_wheel_metadata"
|
2021-11-13 15:20:20 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2021-12-03 10:28:51 +00:00
|
|
|
# Expects Apple's Python and its quirks
|
2021-11-13 15:20:20 +00:00
|
|
|
"test_can_get_venv_paths_with_conflicting_default_scheme"
|
2021-03-03 10:00:51 +00:00
|
|
|
];
|
|
|
|
|
2021-12-03 10:28:51 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"build"
|
|
|
|
];
|
2020-06-11 09:36:29 +00:00
|
|
|
|
2020-12-25 20:01:33 +00:00
|
|
|
meta = with lib; {
|
|
|
|
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";
|
2023-02-26 11:44:01 +00:00
|
|
|
changelog = "https://github.com/pypa/build/blob/${version}/CHANGELOG.rst";
|
2020-12-25 20:01:33 +00:00
|
|
|
license = licenses.mit;
|
2021-12-03 10:28:51 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-06-11 09:36:29 +00:00
|
|
|
};
|
2020-08-25 02:07:09 +00:00
|
|
|
}
|