python312Packages.more-properties: cleanup & disable on python >= 3.13
This commit is contained in:
parent
07e1242add
commit
34f8215375
@ -1,37 +1,43 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
pythonOlder,
|
pythonAtLeast,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
setuptools,
|
||||||
pytestCheckHook,
|
pytestCheckHook,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "more-properties";
|
pname = "more-properties";
|
||||||
version = "1.1.1";
|
version = "1.1.1";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
# upstream requires >= 3.6 but only 3.7 includes dataclasses
|
# All tests are failing with:
|
||||||
disabled = pythonOlder "3.7";
|
# AssertionError: None != 'The type of the None singleton.'
|
||||||
|
disabled = pythonAtLeast "3.13";
|
||||||
format = "setuptools";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "madman-bob";
|
owner = "madman-bob";
|
||||||
repo = "python-more-properties";
|
repo = "python-more-properties";
|
||||||
rev = version;
|
tag = version;
|
||||||
hash = "sha256-dKG97rw5IG19m7u3ZDBM2yGScL5cFaKBvGZxPVJaUTE=";
|
hash = "sha256-dKG97rw5IG19m7u3ZDBM2yGScL5cFaKBvGZxPVJaUTE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
mv pypi_upload/setup.py .
|
mv pypi_upload/setup.py .
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace "project_root = Path(__file__).parents[1]" "project_root = Path(__file__).parents[0]"
|
--replace-fail "project_root = Path(__file__).parents[1]" "project_root = Path(__file__).parents[0]"
|
||||||
|
|
||||||
# dataclasses is included in Python 3.7
|
|
||||||
substituteInPlace requirements.txt \
|
|
||||||
--replace dataclasses ""
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonRemoveDeps = [
|
||||||
|
# dataclasses is included in Python since 3.7
|
||||||
|
"dataclasses"
|
||||||
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [ pytestCheckHook ];
|
nativeCheckInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
pythonImportsCheck = [ "more_properties" ];
|
pythonImportsCheck = [ "more_properties" ];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user