python-constraint2 2.7.1__tar.gz → 2.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/PKG-INFO +1 -1
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/cythonize_build.py +18 -4
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/pyproject.toml +1 -1
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/LICENSE +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/README.rst +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/__init__.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/constraints.c +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/constraints.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/domain.c +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/domain.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/parser.c +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/parser.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/problem.c +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/problem.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/solvers.c +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/constraint/solvers.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/__init__.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/benchmarks.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/setup_teardown.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/test_compilation.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/test_constraint.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/test_doctests.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/test_examples.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/test_parser.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/test_problem.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/test_solvers.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/test_some_not_in_set.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/test_toml_file.py +0 -0
- {python_constraint2-2.7.1 → python_constraint2-2.7.2}/tests/test_util_benchmark.py +0 -0
|
@@ -4,6 +4,7 @@ Based on https://blagovdaryu.hashnode.dev/tremendously-speed-up-python-code-with
|
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import os
|
|
7
|
+
import sys
|
|
7
8
|
import shutil
|
|
8
9
|
from subprocess import CalledProcessError
|
|
9
10
|
from warnings import warn
|
|
@@ -15,10 +16,23 @@ from setuptools import Distribution, Extension
|
|
|
15
16
|
module_name = "constraint"
|
|
16
17
|
cython_modules = ["constraints", "domain", "problem", "solvers", "parser"]
|
|
17
18
|
ext = "py"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
macos_target = os.environ.get("MACOSX_DEPLOYMENT_TARGET")
|
|
20
|
+
if sys.platform == "darwin" and macos_target is not None:
|
|
21
|
+
macos_flags = [f"-mmacosx-version-min={macos_target}"]
|
|
22
|
+
extensions = [
|
|
23
|
+
Extension(
|
|
24
|
+
f"constraint.{module}",
|
|
25
|
+
[f"constraint/{module}.{ext}"],
|
|
26
|
+
extra_compile_args=["-O3", *macos_flags],
|
|
27
|
+
extra_link_args=macos_flags,
|
|
28
|
+
)
|
|
29
|
+
for module in cython_modules
|
|
30
|
+
]
|
|
31
|
+
else:
|
|
32
|
+
extensions = [
|
|
33
|
+
Extension(f"constraint.{module}", [f"constraint/{module}.{ext}"], extra_compile_args=["-O3"])
|
|
34
|
+
for module in cython_modules
|
|
35
|
+
]
|
|
22
36
|
|
|
23
37
|
# Cythonize the files
|
|
24
38
|
ext_modules = cythonize(extensions, include_path=[module_name], language_level=3, force=True)
|
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-constraint2" # when set back to "python-constraint", don't forget to remove '2' in other places (e.g. README)
|
|
7
7
|
description = "python-constraint is a module for efficiently solving CSPs (Constraint Solving Problems) over finite domains."
|
|
8
|
-
version = "2.7.
|
|
8
|
+
version = "2.7.2" # adhere to PEP440 versioning: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#id55
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Floris-Jan Willemsen", email = "fjwillemsen97@gmail.com"},
|
|
11
11
|
{name = "Sébastien Celles", email = "s.celles@gmail.com"},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|