PyQUDA-Utils 0.10.7.dev2__tar.gz → 0.10.7.dev4__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.
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/PKG-INFO +1 -1
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/PyQUDA_Utils.egg-info/PKG-INFO +1 -1
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/PyQUDA_Utils.egg-info/SOURCES.txt +1 -0
- pyquda_utils-0.10.7.dev4/PyQUDA_Utils.egg-info/entry_points.txt +2 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyproject.toml +3 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_plugins/__main__.py +31 -45
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_plugins/plugin_pyx.py +27 -25
- pyquda_utils-0.10.7.dev4/pyquda_utils/_version.py +1 -0
- pyquda_utils-0.10.7.dev2/pyquda_utils/_version.py +0 -1
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/LICENSE +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/MANIFEST.in +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/PyQUDA_Utils.egg-info/dependency_links.txt +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/PyQUDA_Utils.egg-info/requires.txt +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/PyQUDA_Utils.egg-info/top_level.txt +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/README.md +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/__init__.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/_field_utils.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/_mpi_file.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/chroma.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/io_general.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/kyu.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/lime.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/milc.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/nersc.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/npy.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/openqcd.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_io/xqcd.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_plugins/pygwu/__init__.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/__init__.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/alg_remez.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/convert.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/core.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/deprecated.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/gamma.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/gauge_nd_sun.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/gpt.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/hmc_param.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/io/__init__.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/milc_rhmc_param.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/phase.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/quasi_axial_gauge_fixing.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/source.py +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/setup.cfg +0 -0
- {pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyQUDA-Utils
|
|
3
|
-
Version: 0.10.7.
|
|
3
|
+
Version: 0.10.7.dev4
|
|
4
4
|
Summary: Utility scripts based on PyQUDA
|
|
5
5
|
Author-email: SaltyChiang <SaltyChiang@users.noreply.github.com>
|
|
6
6
|
Maintainer-email: SaltyChiang <SaltyChiang@users.noreply.github.com>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyQUDA-Utils
|
|
3
|
-
Version: 0.10.7.
|
|
3
|
+
Version: 0.10.7.dev4
|
|
4
4
|
Summary: Utility scripts based on PyQUDA
|
|
5
5
|
Author-email: SaltyChiang <SaltyChiang@users.noreply.github.com>
|
|
6
6
|
Maintainer-email: SaltyChiang <SaltyChiang@users.noreply.github.com>
|
|
@@ -42,3 +42,6 @@ Homepage = "https://github.com/CLQCD/PyQUDA"
|
|
|
42
42
|
Documentation = "https://github.com/CLQCD/PyQUDA/wiki/Documentation"
|
|
43
43
|
Repository = "https://github.com/CLQCD/PyQUDA.git"
|
|
44
44
|
Issues = "https://github.com/CLQCD/PyQUDA/issues"
|
|
45
|
+
|
|
46
|
+
[project.scripts]
|
|
47
|
+
pyquda_plugins = "pyquda_plugins.__main__:main"
|
|
@@ -5,10 +5,7 @@ import logging
|
|
|
5
5
|
import os
|
|
6
6
|
import shutil
|
|
7
7
|
from setuptools import Extension
|
|
8
|
-
|
|
9
|
-
from distutils.command.build_py import build_py
|
|
10
|
-
from distutils.command.build_ext import build_ext
|
|
11
|
-
from distutils.command.install_lib import install_lib
|
|
8
|
+
from setuptools.command.build_ext import build_ext
|
|
12
9
|
import sys
|
|
13
10
|
import tempfile
|
|
14
11
|
|
|
@@ -20,17 +17,14 @@ import numpy
|
|
|
20
17
|
|
|
21
18
|
|
|
22
19
|
def dynamic(lib, header, include_path, library_path):
|
|
23
|
-
from pyquda_plugins.plugin_pyx import
|
|
20
|
+
from pyquda_plugins.plugin_pyx import build_plugin_pyx
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
plugin = Plugin(lib, header, include_path)
|
|
27
|
-
plugin.write(plugins_root)
|
|
28
|
-
source = os.path.join(plugins_root, f"py{lib}", "src", f"_py{lib}.pyx")
|
|
22
|
+
build_plugin_pyx(os.path.dirname(__file__), lib, header, include_path)
|
|
29
23
|
return cythonize(
|
|
30
24
|
[
|
|
31
25
|
Extension(
|
|
32
26
|
name=f"pyquda_plugins.py{lib}._py{lib}",
|
|
33
|
-
sources=[
|
|
27
|
+
sources=[os.path.join(f"pyquda_plugins/py{lib}/src/_py{lib}.pyx")],
|
|
34
28
|
include_dirs=[include_path, numpy.get_include()],
|
|
35
29
|
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
|
|
36
30
|
library_dirs=[library_path],
|
|
@@ -43,8 +37,7 @@ def dynamic(lib, header, include_path, library_path):
|
|
|
43
37
|
)[0]
|
|
44
38
|
|
|
45
39
|
|
|
46
|
-
def build_and_install(
|
|
47
|
-
build_temp = tempfile.mkdtemp(prefix="pyquda_plugins_")
|
|
40
|
+
def build_and_install(module):
|
|
48
41
|
dist = Distribution(
|
|
49
42
|
{
|
|
50
43
|
"ext_modules": [module],
|
|
@@ -54,34 +47,28 @@ def build_and_install(lib, module, inplace):
|
|
|
54
47
|
}
|
|
55
48
|
)
|
|
56
49
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
_install_lib
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
# for src, module in zip(ext, module_list):
|
|
80
|
-
# dst = "/tmp"
|
|
81
|
-
# log.info(f"copying {src} -> {dst}")
|
|
82
|
-
# # shutil.copy2(src, dst)
|
|
83
|
-
|
|
84
|
-
shutil.rmtree(build_temp)
|
|
50
|
+
build_temp = tempfile.mkdtemp(prefix="pyquda_plugins_")
|
|
51
|
+
try:
|
|
52
|
+
# log.info("running build_py")
|
|
53
|
+
# _build_py = build_py(dist)
|
|
54
|
+
# _build_py.build_lib = build_temp
|
|
55
|
+
# _build_py.ensure_finalized()
|
|
56
|
+
# _build_py.run()
|
|
57
|
+
log.info("running build_ext")
|
|
58
|
+
_build_ext = build_ext(dist)
|
|
59
|
+
_build_ext.build_lib = build_temp
|
|
60
|
+
_build_ext.build_temp = build_temp
|
|
61
|
+
_build_ext.inplace = True
|
|
62
|
+
_build_ext.ensure_finalized()
|
|
63
|
+
_build_ext.run()
|
|
64
|
+
# if not inplace:
|
|
65
|
+
# log.info("running install_lib")
|
|
66
|
+
# _install_lib = install_lib(dist)
|
|
67
|
+
# _install_lib.inplace = inplace
|
|
68
|
+
# _install_lib.ensure_finalized()
|
|
69
|
+
# _install_lib.run()
|
|
70
|
+
finally:
|
|
71
|
+
shutil.rmtree(build_temp)
|
|
85
72
|
|
|
86
73
|
|
|
87
74
|
def main():
|
|
@@ -106,12 +93,11 @@ def main():
|
|
|
106
93
|
"--include_path",
|
|
107
94
|
required=True,
|
|
108
95
|
)
|
|
109
|
-
parser.add_argument(
|
|
110
|
-
"--inplace",
|
|
111
|
-
action="store_true",
|
|
112
|
-
)
|
|
113
96
|
args = parser.parse_args()
|
|
114
|
-
|
|
97
|
+
cwd = os.getcwd()
|
|
98
|
+
os.chdir(os.path.join(os.path.dirname(__file__), ".."))
|
|
99
|
+
build_and_install(dynamic(args.lib, args.header, args.include_path, args.library_path))
|
|
100
|
+
os.chdir(cwd)
|
|
115
101
|
|
|
116
102
|
|
|
117
103
|
if __name__ == "__main__":
|
|
@@ -182,29 +182,31 @@ def parseHeader(header, include_path):
|
|
|
182
182
|
return funcs
|
|
183
183
|
|
|
184
184
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
185
|
+
def build_plugin_pyx(plugins_root, lib: str, header: str, include_path: str):
|
|
186
|
+
lib_pxd = f'cdef extern from "{header}":\n'
|
|
187
|
+
pylib_pyx = (
|
|
188
|
+
"from libcpp cimport bool\n"
|
|
189
|
+
"from numpy cimport ndarray\n"
|
|
190
|
+
"from pyquda_comm.pointer cimport Pointer, _NDArray\n"
|
|
191
|
+
f"cimport {lib}\n"
|
|
192
|
+
"\n"
|
|
193
|
+
)
|
|
194
|
+
pylib_pyi = "from numpy import int32, float64, complex128\n" "from numpy.typing import NDArray\n" "\n"
|
|
195
|
+
c_funcs = parseHeader(header, include_path)
|
|
196
|
+
for c_func in c_funcs:
|
|
197
|
+
lib_pxd += f" {c_func}\n"
|
|
198
|
+
pylib_pyx += "\n" + c_func.pyx(lib)
|
|
199
|
+
pylib_pyi += c_func.pyi()
|
|
200
|
+
|
|
201
|
+
os.makedirs(os.path.join(plugins_root, f"py{lib}", "src"), exist_ok=True)
|
|
202
|
+
with open(os.path.join(plugins_root, f"py{lib}", "src", f"{lib}.pxd"), "w") as f:
|
|
203
|
+
f.write(lib_pxd)
|
|
204
|
+
with open(os.path.join(plugins_root, f"py{lib}", "src", f"_py{lib}.pyx"), "w") as f:
|
|
205
|
+
f.write(pylib_pyx)
|
|
206
|
+
with open(os.path.join(plugins_root, f"py{lib}", f"_py{lib}.pyi"), "w") as f:
|
|
207
|
+
f.write(pylib_pyi)
|
|
202
208
|
|
|
203
|
-
|
|
204
|
-
os.
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
with open(os.path.join(plugins_root, f"py{self.lib}", "src", f"_py{self.lib}.pyx"), "w") as f:
|
|
208
|
-
f.write(self.pylib_pyx)
|
|
209
|
-
with open(os.path.join(plugins_root, f"py{self.lib}", f"_py{self.lib}.pyi"), "w") as f:
|
|
210
|
-
f.write(self.pylib_pyi)
|
|
209
|
+
if os.path.exists(os.path.join(plugins_root, "yacctab.py")):
|
|
210
|
+
os.remove(os.path.join(plugins_root, "yacctab.py"))
|
|
211
|
+
if os.path.exists(os.path.join(plugins_root, "lextab.py")):
|
|
212
|
+
os.remove(os.path.join(plugins_root, "lextab.py"))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.10.7.dev4"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.10.7.dev2"
|
|
File without changes
|
|
File without changes
|
{pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/PyQUDA_Utils.egg-info/dependency_links.txt
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyquda_utils-0.10.7.dev2 → pyquda_utils-0.10.7.dev4}/pyquda_utils/quasi_axial_gauge_fixing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|