Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 34 additions & 16 deletions pkgs/development/python-modules/pep517/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,69 @@
, buildPythonPackage
, fetchPypi
, flit-core
, toml
, pythonOlder
, importlib-metadata
, zipp
, pip
, pytestCheckHook
, pythonOlder
, setuptools
, testpath
, mock
, pip
, tomli
, zipp
}:

buildPythonPackage rec {
pname = "pep517";
version = "0.9.1";
version = "0.12.0";
format = "pyproject";

disabled = pythonOlder "3.6";

src = fetchPypi {
inherit pname version;
sha256 = "0zqidxah03qpnp6zkg3zd1kmd5f79hhdsfmlc0cldaniy80qddxf";
hash = "sha256-kxN42T0RspjPUR3WNM9epMskmijvhBYLMkfumvtOirA=";
};

nativeBuildInputs = [
flit-core
];

propagatedBuildInputs = [
toml
tomli
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata zipp
importlib-metadata
zipp
];

checkInputs = [
pip
pytestCheckHook
setuptools
testpath
mock
pip
];

preCheck = ''
rm pytest.ini # wants flake8
rm tests/test_meta.py # wants to run pip
postPatch = ''
substituteInPlace pytest.ini \
--replace "--flake8" ""
'';

meta = {
disabledTestPaths = [
# Tests require network access
"tests/test_meta.py"
];

disabledTests = [
"test_issue_104"
"test_setup_py"
];

pythonImportsCheck = [
"pep517"
];

meta = with lib; {
description = "Wrappers to build Python packages using PEP 517 hooks";
license = lib.licenses.mit;
license = licenses.mit;
homepage = "https://github.com/pypa/pep517";
maintainers = with maintainers; [ ];
};
}