mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 08:26:37 +01:00
Conflicts: pkgs/development/python-modules/bundlewrap/default.nix pkgs/development/python-modules/coverage/default.nix pkgs/development/python-modules/h5netcdf/default.nix pkgs/development/python-modules/hypothesis/default.nix pkgs/development/python-modules/numba/default.nix pkgs/development/python-modules/optype/default.nix pkgs/development/python-modules/setuptools-git-versioning/default.nix pkgs/development/python-modules/sphinx/default.nix
107 lines
2.4 KiB
Nix
107 lines
2.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
build,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
flit-core,
|
|
filelock,
|
|
packaging,
|
|
pyproject-hooks,
|
|
pytest-mock,
|
|
pytest-rerunfailures,
|
|
pytest-xdist,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
virtualenv,
|
|
wheel,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "build";
|
|
version = "1.4.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pypa";
|
|
repo = "build";
|
|
tag = version;
|
|
hash = "sha256-otaAFL87o+1YB5/ar2rlOpDjFCWOKs+gfqZImuWH8IA=";
|
|
};
|
|
|
|
build-system = [ flit-core ];
|
|
|
|
pythonRemoveDeps = [ "importlib-metadata" ];
|
|
|
|
dependencies = [
|
|
packaging
|
|
pyproject-hooks
|
|
];
|
|
|
|
# We need to disable tests because this package is part of the bootstrap chain
|
|
# and its test dependencies cannot be built yet when this is being built.
|
|
doCheck = false;
|
|
|
|
passthru.tests = {
|
|
pytest = buildPythonPackage {
|
|
pname = "${pname}-pytest";
|
|
inherit src version;
|
|
pyproject = false;
|
|
|
|
dontBuild = true;
|
|
dontInstall = true;
|
|
|
|
nativeCheckInputs = [
|
|
build
|
|
filelock
|
|
pytest-mock
|
|
pytest-rerunfailures
|
|
pytest-xdist
|
|
pytestCheckHook
|
|
setuptools
|
|
virtualenv
|
|
wheel
|
|
];
|
|
|
|
pytestFlags = [
|
|
"-Wignore::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"
|
|
# Tests require network access to run pip install
|
|
"test_verbose_output"
|
|
"test_requirement_installation"
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
# Expects Apple's Python and its quirks
|
|
"test_can_get_venv_paths_with_conflicting_default_scheme"
|
|
];
|
|
};
|
|
};
|
|
|
|
pythonImportsCheck = [ "build" ];
|
|
|
|
meta = {
|
|
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/${src.tag}/CHANGELOG.rst";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ lib.maintainers.fab ];
|
|
teams = [ lib.teams.python ];
|
|
};
|
|
}
|