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