Unverified Commit 5a3a591b authored by Robert Schütz's avatar Robert Schütz Committed by GitHub
Browse files

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

parents f6c55314 a3881c16
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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 = [
+21 −29
Original line number Diff line number Diff line
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'
@@ -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"}
 
-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"]
-[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"]
 
 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
 [tool.isort]
 profile = "black"
-multi_line_output = 3
\ No newline at end of file
+multi_line_output = 3
+10 −13
Original line number Diff line number Diff line
@@ -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 ];