Skip to content

Commit

Permalink
Bump version to 0.6.0. Prepare for distribution.
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyChiang committed Mar 6, 2024
1 parent 19a6632 commit 88be23e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.idea
.vscode
pyquda/src/*.c
pyquda/src/*.cpp
*.so
.cache
__pycache__
Expand All @@ -14,10 +12,12 @@ script
logs
DATA

# autogenerated wrapper
# autogenerated files
pyquda/src/quda.pxd
pyquda/src/pyquda.pyx
pyquda/enum_quda.py
pyquda/src/*.c
pyquda/src/*.cpp

# pycparser
yacctab.py
Expand Down
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# .gitignore
exclude pyquda/src/quda.pxd
exclude pyquda/src/pyquda.pyx
exclude pyquda/enum_quda.py
exclude pyquda/src/*.c
exclude pyquda/src/*.cpp

exclude tests/*
include pyquda_pyx.py
include pycparser/LICENSE
Expand Down
2 changes: 1 addition & 1 deletion pyquda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SupportsWriteAndFlush(SupportsWrite[_T_contra], SupportsFlush, Protocol[_T

from mpi4py import MPI

__version__ = "0.5.6"
__version__ = "0.6.0"
from . import pyquda as quda
from .field import LatticeInfo

Expand Down
22 changes: 14 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
import os
from distutils.core import Extension, setup
import sys
from setuptools import Extension, setup
from Cython.Build import cythonize
from pyquda_pyx import build_pyquda_pyx

assert "QUDA_PATH" in os.environ, "QUDA_PATH environment is needed to link against libquda"
quda_path = os.path.realpath(os.environ["QUDA_PATH"])
build_pyquda_pyx(os.path.dirname(__file__), quda_path)
if os.path.exists(os.path.join(quda_path, "lib", "libquda.so")):
if "QUDA_PATH" in os.environ:
quda_path = os.path.realpath(os.environ["QUDA_PATH"])
build_pyquda_pyx(os.path.dirname(__file__), quda_path)
if os.path.exists(os.path.join(quda_path, "lib", "libquda.so")):
_STATIC = False
elif os.path.exists(os.path.join(quda_path, "lib", "libquda.a")):
_STATIC = True
else:
raise FileNotFoundError(f"Cannot find libquda.so or libquda.a in {os.path.join(quda_path, 'lib')}")
elif "sdist" in sys.argv:
quda_path = ""
_STATIC = False
elif os.path.exists(os.path.join(quda_path, "lib", "libquda.a")):
_STATIC = True
else:
raise RuntimeError(f"Cannot find libquda.so or libquda.a in {os.path.join(quda_path, 'lib')}")
raise EnvironmentError("QUDA_PATH environment is needed to link against libquda")

extensions = cythonize(
[
Expand Down

0 comments on commit 88be23e

Please sign in to comment.