Skip to content

Commit 9ed4c4b

Browse files
committed
release-script: Merge branch 'release/v1.11.3'
2 parents 4d1793e + 8cd2486 commit 9ed4c4b

File tree

8 files changed

+36
-28
lines changed

8 files changed

+36
-28
lines changed

MANIFEST.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
recursive-include PyHEADTAIL *.pxd *.pyx *.c
2-
recursive-include PyHEADTAIL/testing *.py *.ipynb *.wake *.dat *.pkl
3-
include README.md
4-
include _version.py
1+
recursive-include PyHEADTAIL *.pxd *.pyx *.c *.f90 *.cu
2+
recursive-include PyHEADTAIL/testing *.py *.dat
3+
include README.rst

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
NVCC_RESULT := $(shell which nvcc)
33
NVCC_TEST := $(notdir $(NVCC_RESULT))
44

5-
.PHONY: clean PyHEADTAIL PyHEADTAILGPU
5+
.PHONY: clean PyHEADTAIL PyHEADTAILGPU errfff
66

7-
all: PyHEADTAIL PyHEADTAILGPU
7+
all: PyHEADTAIL PyHEADTAILGPU errfff
88

99
PyHEADTAIL:
1010
python setup.py build_ext --inplace
@@ -16,6 +16,10 @@ else
1616
@echo "GPU: Thrust interface not compiled because nvcc compiler not found."
1717
endif
1818

19+
errfff:
20+
f2py -c PyHEADTAIL/general/errfff.f90 -m errfff
21+
mv errfff.so PyHEADTAIL/general/
22+
1923
clean:
2024
python setup.py build_ext --inplace cleanall
2125
rm -f PyHEADTAIL/gpu/thrust.so

PyHEADTAIL/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
worktree = os.path.dirname(
55
os.path.dirname(os.path.abspath(__file__)))
66
gitdir = worktree + '/.git/'
7-
__version__ = subprocess.check_output(
8-
'git --git-dir=' + gitdir + ' --work-tree=' +
9-
worktree + ' describe --long --dirty --abbrev=10 --tags', shell=True)
7+
with open(os.devnull, 'w') as devnull:
8+
__version__ = subprocess.check_output(
9+
'git --git-dir=' + gitdir + ' --work-tree=' +
10+
worktree + ' describe --long --dirty --abbrev=10 --tags',
11+
shell=True, stderr=devnull)
1012
__version__ = __version__.decode('utf-8').rstrip() # remove trailing \n
1113
__version__ = __version__[1:] # remove leading v
1214
# remove commit hash to conform to PEP440:

PyHEADTAIL/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.11.1'
1+
__version__ = '1.11.3'

PyHEADTAIL/general/pmath.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
'''
77
import numpy as np
88
from ..cobra_functions import stats as cp
9-
from ..gpu import gpu_utils
10-
from ..gpu import gpu_wrap
119
try:
1210
import pycuda.cumath
1311
import pycuda.gpuarray
1412
import pycuda.tools
13+
from ..gpu import gpu_utils
14+
from ..gpu import gpu_wrap
1515
has_pycuda = gpu_wrap.has_pycuda
16-
except ImportError:
16+
except (ImportError, OSError):
1717
# print ('No Pycuda in pmath.py import statement found')
1818
has_pycuda = False
1919
try:

PyHEADTAIL/trackers/longitudinal_tracking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,6 @@ def __init__(self, alpha_array, circumference, Q_s, D_x=0, D_y=0,*args, **kwargs
719719
def Qs(self):
720720
return self.Q_s
721721

722-
@clean_slices
723722
def track(self, beam):
724723
try:
725724
self.track_with_dispersion(beam)
@@ -743,6 +742,7 @@ def track_with_dispersion(self, beam):
743742
beam.x += self.D_x*beam.dp
744743
beam.y += self.D_y*beam.dp
745744

745+
@clean_slices
746746
def track_without_dispersion(self, beam):
747747
omega_0 = 2 * np.pi * beam.beta * c / self.circumference
748748
omega_s = self.Q_s * omega_0

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ And there you go, start using PyHEADTAIL!
3636
3737
In [1]: import PyHEADTAIL
3838
39-
PyHEADTAIL v1.11.1
39+
PyHEADTAIL v1.11.2
4040
4141
4242
-------------------------------------------------------------------------------

setup.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
# thanks to Nick Foti for his cython skeleton, cf.
44
# http://nfoti.github.io/a-creative-blog-name/posts/2013/02/07/cleaning-cython-build-files/
@@ -24,11 +24,6 @@
2424
raw_input('Hit any key to continue...')
2525

2626

27-
if not __version__[0].isdigit():
28-
raise RuntimeError("Unable to determine version from _version.py, "
29-
"perhaps no git-describe available?")
30-
31-
3227
args = sys.argv[1:]
3328
# Make a `cleanall` rule to get rid of intermediate and library files
3429
if "cleanall" in args:
@@ -58,7 +53,11 @@
5853

5954

6055
# Set up extension and build
61-
cy_ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
56+
cy_ext_options = {
57+
"compiler_directives": {"profile": True, # SLOW!!!
58+
"embedsignature": True},
59+
"annotate": True,
60+
}
6261
cy_ext = [
6362
Extension("PyHEADTAIL.cobra_functions.stats",
6463
["PyHEADTAIL/cobra_functions/stats.pyx"],
@@ -87,6 +86,10 @@
8786
description='CERN PyHEADTAIL numerical n-body simulation code '
8887
'for simulating macro-particle beam dynamics with collective effects.',
8988
url='https://github.com/PyCOMPLETE/PyHEADTAIL',
89+
author='Kevin Li',
90+
author_email='[email protected]',
91+
maintainer='Adrian Oeftiger',
92+
maintainer_email='[email protected]',
9093
packages=find_packages(),
9194
long_description=long_description,
9295
cmdclass={'build_ext': build_ext},
@@ -98,10 +101,10 @@
98101
'h5py',
99102
'cython',
100103
]
101-
)
102-
103-
from numpy.distutils.core import setup, Extension
104-
setup(
105-
ext_modules = [Extension('PyHEADTAIL.general.errfff',
106-
['PyHEADTAIL/general/errfff.f90'])],
107104
)
105+
106+
# from numpy.distutils.core import setup, Extension
107+
# setup(
108+
# ext_modules = [Extension('PyHEADTAIL.general.errfff',
109+
# ['PyHEADTAIL/general/errfff.f90'])],
110+
# )

0 commit comments

Comments
 (0)