parallel-sparse-tools 0.2.2__tar.gz → 0.2.4__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. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/PKG-INFO +6 -5
  2. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/pyproject.toml +30 -14
  3. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/setup.py +30 -14
  4. parallel_sparse_tools-0.2.4/src/parallel_sparse_tools/__init__.py +1 -0
  5. parallel_sparse_tools-0.2.4/src/parallel_sparse_tools/_version.py +1 -0
  6. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/expm_multiply_parallel_core/expm_multiply_parallel_core.py +0 -1
  7. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/expm_multiply_parallel_core/expm_multiply_parallel_wrapper.cpp +30182 -29997
  8. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/matvec/_oputils.cpp +7438 -6276
  9. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools.egg-info/PKG-INFO +6 -5
  10. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools.egg-info/SOURCES.txt +3 -1
  11. parallel_sparse_tools-0.2.4/test/test_version.py +5 -0
  12. parallel_sparse_tools-0.2.2/src/parallel_sparse_tools/__init__.py +0 -0
  13. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/LICENSE +0 -0
  14. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/README.md +0 -0
  15. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/setup.cfg +0 -0
  16. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/expm_multiply_parallel_core/__init__.py +0 -0
  17. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/expm_multiply_parallel_core/generate_source.py +0 -0
  18. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/expm_multiply_parallel_core/source/csr_utils.h +0 -0
  19. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/expm_multiply_parallel_core/source/expm_multiply_parallel_impl.h +0 -0
  20. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/matvec/__init__.py +0 -0
  21. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/matvec/_oputils/oputils_impl.h +0 -0
  22. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/matvec/generate_oputils.py +0 -0
  23. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools/matvec/matvec_core.py +0 -0
  24. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools.egg-info/dependency_links.txt +0 -0
  25. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools.egg-info/requires.txt +0 -0
  26. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/src/parallel_sparse_tools.egg-info/top_level.txt +0 -0
  27. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/test/test.py +0 -0
  28. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/test/test_expm_multiply_parallel.py +0 -0
  29. {parallel_sparse_tools-0.2.2 → parallel_sparse_tools-0.2.4}/test/test_matvec.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: parallel-sparse-tools
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: My package description
5
5
  Author-email: Phillip Weinberg <weinbe58@gmail.com>
6
6
  License: BSD-3-Clause
@@ -8,15 +8,16 @@ Classifier: Development Status :: 3 - Alpha
8
8
  Classifier: Operating System :: Microsoft :: Windows
9
9
  Classifier: Operating System :: MacOS
10
10
  Classifier: Operating System :: POSIX :: Linux
11
- Classifier: Programming Language :: Python :: 3.9
12
- Classifier: Programming Language :: Python :: 3.10
13
11
  Classifier: Programming Language :: Python :: 3.11
14
12
  Classifier: Programming Language :: Python :: 3.12
15
- Requires-Python: <3.13,>=3.9
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Requires-Python: <3.15,>=3.11
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: numpy>=2.0.0
19
19
  Requires-Dist: scipy>=1.13.0
20
+ Dynamic: license-file
20
21
 
21
22
  [![codecov](https://codecov.io/gh/QuSpin/parallel-sparse-tools/graph/badge.svg?token=1OECNN8334)](https://codecov.io/gh/QuSpin/parallel-sparse-tools)
22
23
  # parallel-sparse-tools
@@ -1,26 +1,26 @@
1
1
  [build-system]
2
- requires = ["setuptools", "wheel", "Cython", "numpy"]
2
+ requires = ["setuptools>=64", "wheel", "Cython>3.1", "numpy"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "parallel-sparse-tools"
7
- version = "0.2.2"
7
+ version = "0.2.4"
8
8
  authors = [
9
9
  {name = "Phillip Weinberg", email = "weinbe58@gmail.com"},
10
10
  ]
11
11
  description = "My package description"
12
12
  readme = "README.md"
13
- requires-python = ">=3.9,<3.13"
13
+ requires-python = ">=3.11,<3.15"
14
14
  license = {text = "BSD-3-Clause"}
15
15
  classifiers = [
16
16
  "Development Status :: 3 - Alpha",
17
17
  "Operating System :: Microsoft :: Windows",
18
18
  "Operating System :: MacOS",
19
19
  "Operating System :: POSIX :: Linux",
20
- "Programming Language :: Python :: 3.9",
21
- "Programming Language :: Python :: 3.10",
22
20
  "Programming Language :: Python :: 3.11",
23
21
  "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Programming Language :: Python :: 3.14",
24
24
  ]
25
25
  dependencies = [
26
26
  "numpy>=2.0.0",
@@ -28,13 +28,26 @@ dependencies = [
28
28
  ]
29
29
 
30
30
 
31
+ [tool.pdm.dev-dependencies]
32
+ dev = [
33
+ "pytest>=8.3.1",
34
+ ]
35
+
36
+ [tool.pdm.scripts]
37
+ _.env_file = "./.env"
38
+ upload = "python -m twine upload -r bloqade dist/*"
39
+ build = {cmd = "pdm build"}
40
+ publish = {composite = ["build", "upload"]}
41
+ test = {shell = "pytest -x"}
42
+
43
+
31
44
  [tool.cibuildwheel]
32
45
  skip = ""
33
46
 
34
47
  build-frontend = "default"
35
48
  config-settings = {}
36
49
  dependency-versions = "pinned"
37
- environment = {}
50
+ #environment = {}
38
51
  environment-pass = []
39
52
  build-verbosity = 1
40
53
 
@@ -49,14 +62,14 @@ test-extras = []
49
62
 
50
63
  container-engine = "docker"
51
64
 
52
- manylinux-x86_64-image = "manylinux2014"
53
- manylinux-i686-image = "manylinux2014"
54
- manylinux-aarch64-image = "manylinux2014"
55
- manylinux-ppc64le-image = "manylinux2014"
56
- manylinux-s390x-image = "manylinux2014"
57
- manylinux-pypy_x86_64-image = "manylinux2014"
58
- manylinux-pypy_i686-image = "manylinux2014"
59
- manylinux-pypy_aarch64-image = "manylinux2014"
65
+ manylinux-x86_64-image = "manylinux_2_28"
66
+ manylinux-i686-image = "manylinux_2_28"
67
+ manylinux-aarch64-image = "manylinux_2_28"
68
+ manylinux-ppc64le-image = "manylinux_2_28"
69
+ manylinux-s390x-image = "manylinux_2_28"
70
+ manylinux-pypy_x86_64-image = "manylinux_2_28"
71
+ manylinux-pypy_i686-image = "manylinux_2_28"
72
+ manylinux-pypy_aarch64-image = "manylinux_2_28"
60
73
 
61
74
  musllinux-x86_64-image = "musllinux_1_2"
62
75
  musllinux-i686-image = "musllinux_1_2"
@@ -71,7 +84,10 @@ repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
71
84
 
72
85
  [tool.cibuildwheel.macos]
73
86
  archs = ["native"]
87
+ before-all = "brew install libomp"
88
+ environment = {MACOSX_DEPLOYMENT_TARGET = "15.0"}
74
89
  repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
75
90
 
91
+
76
92
  [tool.cibuildwheel.windows]
77
93
  archs = ["native"]
@@ -8,16 +8,36 @@ import subprocess
8
8
  import numpy as np
9
9
 
10
10
 
11
+ def _find_libomp():
12
+ """Find libomp include and lib dirs on macOS. Returns (include_dir, lib_dir) or raises."""
13
+ # Common locations: Homebrew on Apple Silicon, Homebrew on Intel, MacPorts, conda
14
+ candidates = [
15
+ "/opt/homebrew/opt/libomp", # Homebrew on Apple Silicon
16
+ "/usr/local/opt/libomp", # Homebrew on Intel
17
+ "/opt/local", # MacPorts
18
+ os.environ.get("LIBOMP_PREFIX", ""), # user-specified override
19
+ ]
20
+ for prefix in candidates:
21
+ if prefix and os.path.isfile(os.path.join(prefix, "include", "omp.h")):
22
+ return os.path.join(prefix, "include"), os.path.join(prefix, "lib")
23
+
24
+ raise RuntimeError(
25
+ "\n\nCould not find libomp, which is required to build parallel-sparse-tools on macOS.\n"
26
+ "Install it with: brew install libomp\n"
27
+ "Or set the LIBOMP_PREFIX environment variable to your libomp installation directory.\n"
28
+ )
29
+
30
+
11
31
  def extra_compile_args() -> List[str]:
32
+
12
33
  if sys.platform in ["win32", "cygwin", "win64"]:
13
34
  extra_compile_args = ["/openmp", "/std:c++17"]
14
- if sys.platform in ["darwin"]:
35
+
36
+ elif sys.platform == "darwin":
37
+ include_dir, _ = _find_libomp()
15
38
  extra_compile_args = [
16
- "-DLLVM_ENABLE_PROJECTS",
17
- "-Xpreprocessor",
18
- "-fopenmp-version=50"
19
- "-fopenmp",
20
- "--std=c++17",
39
+ "-Xpreprocessor", "-fopenmp", "--std=c++17",
40
+ f"-I{include_dir}",
21
41
  ]
22
42
  else:
23
43
  extra_compile_args = ["-fopenmp", "--std=c++17"]
@@ -40,13 +60,9 @@ def extra_compile_args() -> List[str]:
40
60
  def extra_link_args() -> List[str]:
41
61
  if sys.platform in ["win32", "cygwin", "win64"]:
42
62
  extra_link_args = ["/openmp"]
43
- if sys.platform in ["darwin"]:
44
- extra_link_args = [
45
- "-DLLVM_ENABLE_PROJECTS",
46
- "-Xpreprocessor",
47
- "-fopenmp-version=50"
48
- "-fopenmp",
49
- ]
63
+ elif sys.platform == "darwin":
64
+ _, lib_dir = _find_libomp()
65
+ extra_link_args = ["-lomp", f"-L{lib_dir}"]
50
66
  else:
51
67
  extra_link_args = ["-fopenmp"]
52
68
 
@@ -124,4 +140,4 @@ setup(
124
140
  packages=find_packages(where="src"),
125
141
  package_dir={"": "src"},
126
142
  ext_modules=ext_modules,
127
- )
143
+ )
@@ -0,0 +1 @@
1
+ from ._version import __version__ as __version__
@@ -0,0 +1 @@
1
+ __version__ = "0.2.4"
@@ -234,7 +234,6 @@ class ExpmMultiplyParallel(object):
234
234
  else:
235
235
  tol = _np.array(self._tol, dtype=mu.real.dtype)
236
236
  if v.ndim == 1:
237
- print(a.dtype, tol.dtype, mu.dtype, v.dtype, work_array.dtype)
238
237
  _wrapper_expm_multiply(
239
238
  self._A.indptr,
240
239
  self._A.indices,