Skip to content

Commit

Permalink
release-script: Merge branch 'release/v1.11.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
aoeftiger committed Mar 26, 2017
2 parents 4d1793e + 8cd2486 commit 9ed4c4b
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 28 deletions.
7 changes: 3 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
recursive-include PyHEADTAIL *.pxd *.pyx *.c
recursive-include PyHEADTAIL/testing *.py *.ipynb *.wake *.dat *.pkl
include README.md
include _version.py
recursive-include PyHEADTAIL *.pxd *.pyx *.c *.f90 *.cu
recursive-include PyHEADTAIL/testing *.py *.dat
include README.rst
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
NVCC_RESULT := $(shell which nvcc)
NVCC_TEST := $(notdir $(NVCC_RESULT))

.PHONY: clean PyHEADTAIL PyHEADTAILGPU
.PHONY: clean PyHEADTAIL PyHEADTAILGPU errfff

all: PyHEADTAIL PyHEADTAILGPU
all: PyHEADTAIL PyHEADTAILGPU errfff

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

errfff:
f2py -c PyHEADTAIL/general/errfff.f90 -m errfff
mv errfff.so PyHEADTAIL/general/

clean:
python setup.py build_ext --inplace cleanall
rm -f PyHEADTAIL/gpu/thrust.so
8 changes: 5 additions & 3 deletions PyHEADTAIL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
worktree = os.path.dirname(
os.path.dirname(os.path.abspath(__file__)))
gitdir = worktree + '/.git/'
__version__ = subprocess.check_output(
'git --git-dir=' + gitdir + ' --work-tree=' +
worktree + ' describe --long --dirty --abbrev=10 --tags', shell=True)
with open(os.devnull, 'w') as devnull:
__version__ = subprocess.check_output(
'git --git-dir=' + gitdir + ' --work-tree=' +
worktree + ' describe --long --dirty --abbrev=10 --tags',
shell=True, stderr=devnull)
__version__ = __version__.decode('utf-8').rstrip() # remove trailing \n
__version__ = __version__[1:] # remove leading v
# remove commit hash to conform to PEP440:
Expand Down
2 changes: 1 addition & 1 deletion PyHEADTAIL/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.11.1'
__version__ = '1.11.3'
6 changes: 3 additions & 3 deletions PyHEADTAIL/general/pmath.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
'''
import numpy as np
from ..cobra_functions import stats as cp
from ..gpu import gpu_utils
from ..gpu import gpu_wrap
try:
import pycuda.cumath
import pycuda.gpuarray
import pycuda.tools
from ..gpu import gpu_utils
from ..gpu import gpu_wrap
has_pycuda = gpu_wrap.has_pycuda
except ImportError:
except (ImportError, OSError):
# print ('No Pycuda in pmath.py import statement found')
has_pycuda = False
try:
Expand Down
2 changes: 1 addition & 1 deletion PyHEADTAIL/trackers/longitudinal_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,6 @@ def __init__(self, alpha_array, circumference, Q_s, D_x=0, D_y=0,*args, **kwargs
def Qs(self):
return self.Q_s

@clean_slices
def track(self, beam):
try:
self.track_with_dispersion(beam)
Expand All @@ -743,6 +742,7 @@ def track_with_dispersion(self, beam):
beam.x += self.D_x*beam.dp
beam.y += self.D_y*beam.dp

@clean_slices
def track_without_dispersion(self, beam):
omega_0 = 2 * np.pi * beam.beta * c / self.circumference
omega_s = self.Q_s * omega_0
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ And there you go, start using PyHEADTAIL!
In [1]: import PyHEADTAIL
PyHEADTAIL v1.11.1
PyHEADTAIL v1.11.2
-------------------------------------------------------------------------------
Expand Down
29 changes: 16 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

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


if not __version__[0].isdigit():
raise RuntimeError("Unable to determine version from _version.py, "
"perhaps no git-describe available?")


args = sys.argv[1:]
# Make a `cleanall` rule to get rid of intermediate and library files
if "cleanall" in args:
Expand Down Expand Up @@ -58,7 +53,11 @@


# Set up extension and build
cy_ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
cy_ext_options = {
"compiler_directives": {"profile": True, # SLOW!!!
"embedsignature": True},
"annotate": True,
}
cy_ext = [
Extension("PyHEADTAIL.cobra_functions.stats",
["PyHEADTAIL/cobra_functions/stats.pyx"],
Expand Down Expand Up @@ -87,6 +86,10 @@
description='CERN PyHEADTAIL numerical n-body simulation code '
'for simulating macro-particle beam dynamics with collective effects.',
url='https://github.com/PyCOMPLETE/PyHEADTAIL',
author='Kevin Li',
author_email='Kevin.Li@cern.ch',
maintainer='Adrian Oeftiger',
maintainer_email='Adrian.Oeftiger@cern.ch',
packages=find_packages(),
long_description=long_description,
cmdclass={'build_ext': build_ext},
Expand All @@ -98,10 +101,10 @@
'h5py',
'cython',
]
)

from numpy.distutils.core import setup, Extension
setup(
ext_modules = [Extension('PyHEADTAIL.general.errfff',
['PyHEADTAIL/general/errfff.f90'])],
)

# from numpy.distutils.core import setup, Extension
# setup(
# ext_modules = [Extension('PyHEADTAIL.general.errfff',
# ['PyHEADTAIL/general/errfff.f90'])],
# )

0 comments on commit 9ed4c4b

Please sign in to comment.