python-constraint2 2.7.1__tar.gz → 2.7.2b2__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.
Files changed (29) hide show
  1. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/PKG-INFO +1 -1
  2. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/cythonize_build.py +18 -4
  3. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/pyproject.toml +1 -1
  4. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/LICENSE +0 -0
  5. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/README.rst +0 -0
  6. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/__init__.py +0 -0
  7. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/constraints.c +0 -0
  8. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/constraints.py +0 -0
  9. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/domain.c +0 -0
  10. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/domain.py +0 -0
  11. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/parser.c +0 -0
  12. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/parser.py +0 -0
  13. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/problem.c +0 -0
  14. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/problem.py +0 -0
  15. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/solvers.c +0 -0
  16. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/constraint/solvers.py +0 -0
  17. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/__init__.py +0 -0
  18. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/benchmarks.py +0 -0
  19. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/setup_teardown.py +0 -0
  20. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/test_compilation.py +0 -0
  21. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/test_constraint.py +0 -0
  22. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/test_doctests.py +0 -0
  23. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/test_examples.py +0 -0
  24. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/test_parser.py +0 -0
  25. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/test_problem.py +0 -0
  26. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/test_solvers.py +0 -0
  27. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/test_some_not_in_set.py +0 -0
  28. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/test_toml_file.py +0 -0
  29. {python_constraint2-2.7.1 → python_constraint2-2.7.2b2}/tests/test_util_benchmark.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-constraint2
3
- Version: 2.7.1
3
+ Version: 2.7.2b2
4
4
  Summary: python-constraint is a module for efficiently solving CSPs (Constraint Solving Problems) over finite domains.
5
5
  License-Expression: BSD-2-Clause
6
6
  License-File: LICENSE
@@ -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
- extensions = [
19
- Extension(f"constraint.{module}", [f"constraint/{module}.{ext}"], extra_compile_args=["-O3"])
20
- for module in cython_modules
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.1" # adhere to PEP440 versioning: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#id55
8
+ version = "2.7.2b2" # 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"},