Merge pull request #270590 from a-n-n-a-l-e-e/gentools-pyproject
python311Packages.gentools: switch to pyproject; fix build
This commit is contained in:
@@ -1,31 +1,47 @@
|
||||
{ buildPythonPackage, lib, fetchFromGitHub, pytest
|
||||
, typing ? null, funcsigs ? null, pythonOlder
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, importlib-metadata
|
||||
, poetry-core
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "gentools";
|
||||
version = "1.2.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
# Pypi doesn't ship the tests, so we fetch directly from GitHub
|
||||
src = fetchFromGitHub {
|
||||
owner = "ariebovenberg";
|
||||
repo = pname;
|
||||
repo = "gentools";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-RBUIji3FOIRjfp4t7zBAVSeiWaYufz4ID8nTWmhDkf8=";
|
||||
hash = "sha256-RBUIji3FOIRjfp4t7zBAVSeiWaYufz4ID8nTWmhDkf8=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs =
|
||||
lib.optionals (pythonOlder "3.5") [ typing ] ++
|
||||
lib.optionals (pythonOlder "3.4") [ funcsigs ];
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytest ];
|
||||
checkPhase = "pytest";
|
||||
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
|
||||
importlib-metadata
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportCheck = [
|
||||
"gentools"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tools for generators, generator functions, and generator-based coroutines";
|
||||
license = licenses.mit;
|
||||
homepage = "https://gentools.readthedocs.io/";
|
||||
changelog = "https://github.com/ariebovenberg/gentools/blob/v${version}/CHANGELOG.rst";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mredaelli ];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user