nixpkgs/pkgs/development/python-modules/build/default.nix

88 lines
1.6 KiB
Nix
Raw Normal View History

2020-06-11 09:36:29 +00:00
{ lib
, stdenv
2020-06-11 09:36:29 +00:00
, buildPythonPackage
2021-07-02 22:28:25 +00:00
, fetchFromGitHub
2021-03-03 10:00:51 +00:00
, filelock
2020-06-11 09:36:29 +00:00
, flit-core
2021-03-03 10:00:51 +00:00
, importlib-metadata
, packaging
, pep517
, 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
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";
2021-12-03 10:28:51 +00:00
version = "0.7.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;
2021-12-03 10:28:51 +00:00
sha256 = "sha256-kT3Gax/ZCeV8Kb7CBArGWn/qzVSVdMRUoid/8cAovnE=";
2020-06-11 09:36:29 +00:00
};
nativeBuildInputs = [
flit-core
];
propagatedBuildInputs = [
packaging
2021-12-03 10:28:51 +00:00
pep517
tomli
2020-06-11 09:36:29 +00:00
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
2021-03-03 10:00:51 +00:00
checkInputs = [
filelock
2021-12-03 10:28:51 +00:00
toml
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
2021-07-02 22:28:25 +00:00
pytestCheckHook
2021-03-03 10:00:51 +00:00
];
2021-12-03 10:28:51 +00:00
pytestFlagsArray = [
"-n"
"$NIX_BUILD_CORES"
];
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"
] ++ lib.optionals stdenv.isDarwin [
2021-12-03 10:28:51 +00:00
# Expects Apple's Python and its quirks
"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";
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
}