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
|
2021-03-19 17:17:44 +00:00
|
|
|
, filelock
|
|
|
|
, importlib-metadata
|
|
|
|
, packaging
|
|
|
|
, pep517
|
|
|
|
, 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";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "0.9.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;
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-iQvfZC/h9SbagExoG8dJ2A8G8gVRdMaRvEy9QcQIN5I=";
|
2020-06-15 15:56:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
setuptools
|
2020-06-15 15:56:04 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
packaging
|
2021-12-19 01:06:50 +00:00
|
|
|
pep517
|
|
|
|
tomli
|
2020-06-15 15:56:04 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-19 17:17:44 +00:00
|
|
|
filelock
|
2021-12-19 01:06:50 +00:00
|
|
|
toml
|
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
|
2021-07-17 21:14:59 +00:00
|
|
|
pytestCheckHook
|
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
|
|
|
];
|
|
|
|
|
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; {
|
|
|
|
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";
|
|
|
|
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
|
|
|
}
|