python312Packages.django-q: fix build (#364654)

This commit is contained in:
Robert Schütz
2024-12-12 10:30:33 -08:00
committed by GitHub
3 changed files with 37 additions and 44 deletions
@@ -17,6 +17,7 @@
pytestCheckHook,
pythonOlder,
redis,
setuptools,
}:
buildPythonPackage rec {
@@ -33,20 +34,23 @@ buildPythonPackage rec {
hash = "sha256-gFSrAl3QGoJEJfvTTvLQgViPPjeJ6BfvgEwgLLo+uAA=";
};
# fixes empty version string
# analog to https://github.com/NixOS/nixpkgs/pull/171200
patches = [ ./pep-621.patch ];
build-system = [
poetry-core
];
pythonRelaxDeps = [
"redis"
];
dependencies = [
django-picklefield
arrow
blessed
django
future
setuptools # for pkg_resources
];
nativeCheckInputs = [
@@ -1,32 +1,24 @@
diff --git a/pyproject.toml b/pyproject.toml
index 9a83e90..0cdffaf 100644
index 9a83e90..07068ac 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,16 +1,12 @@
-[tool.poetry]
+[project]
name = "django-q"
version = "1.3.9"
description = "A multiprocessing distributed task queue for Django"
-authors = ["Ilan Steemers <koed00@gmail.com>"]
-maintainers = ["Ilan Steemers <koed00@gmail.com>"]
-license = "MIT"
+authors = [ { name = "Ilan Steemers", email = "koed00@gmail.com"} ]
+maintainers = [ { name = "Ilan Steemers", email = "koed00@gmail.com"} ]
+license.text = "MIT"
readme = 'README.rst'
-repository = "https://github.com/koed00/django-q"
-homepage = "https://django-q.readthedocs.org"
-documentation = "https://django-q.readthedocs.org"
-
keywords = ["django", "distributed", "multiprocessing", "queue", "scheduler"]
classifiers = [
@@ -31,7 +27,6 @@ classifiers = [
'Topic :: System :: Distributed Computing',
'Topic :: Software Development :: Libraries :: Python Modules',
]
-include = ['CHANGELOG.md']
[tool.poetry.plugins] # Optional super table
@@ -67,13 +67,15 @@ pytest-cov = "^2.12.0"
black = { version = "^21.5b1", allow-prereleases = true }
isort = {extras = ["requirements_deprecated_finder"], version = "^5.8.0"}
-[tool.poetry.extras]
+[build-system]
requires = ["poetry_core>=1.0.0"]
-build-backend = ["poetry.core.masonry.api"]
+build-backend = "poetry.core.masonry.api"
+
+[tool.poetry.extras]
testing = ["django-redis", "croniter", "hiredis", "psutil", "iron-mq", "boto3", "pymongo"]
rollbar = ["django-q-rollbar"]
sentry = ["django-q-sentry"]
[tool.isort]
profile = "black"
-multi_line_output = 3
\ No newline at end of file
+multi_line_output = 3
@@ -4,7 +4,6 @@
pythonOlder,
fetchFromGitHub,
poetry-core,
setuptools,
shapely,
pytestCheckHook,
}:
@@ -13,7 +12,7 @@ buildPythonPackage rec {
pname = "preprocess-cancellation";
version = "0.2.1";
disabled = pythonOlder "3.6"; # >= 3.6
format = "pyproject";
pyproject = true;
# No tests in PyPI
src = fetchFromGitHub {
@@ -26,22 +25,20 @@ buildPythonPackage rec {
postPatch = ''
sed -i "/^addopts/d" pyproject.toml
# setuptools 61 compatibility
# error: Multiple top-level packages discovered in a flat-layout: ['STLs', 'GCode'].
mkdir tests
mv GCode STLs test_* tests
substituteInPlace tests/test_preprocessor.py \
--replace "./GCode" "./tests/GCode"
substituteInPlace tests/test_preprocessor_with_shapely.py \
--replace "./GCode" "./tests/GCode"
cat >> pyproject.toml << EOF
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
EOF
'';
nativeBuildInputs = [
build-system = [
poetry-core
setuptools
];
propagatedBuildInputs = [ shapely ];
optional-dependencies = {
shapely = [ shapely ];
};
nativeCheckInputs = [ pytestCheckHook ];