Skip to content

Commit

Permalink
Merge pull request #13 from Starlink/u/timj/add__version
Browse files Browse the repository at this point in the history
Add __version__ support
  • Loading branch information
timj authored May 2, 2017
2 parents 71c4b49 + 3d15d7f commit a7ad770
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
1.8.1
-----

- Add palpy version to imported code (as __version__).
- Note that the 1.8.0 release was shipped to PyPI with
v0.9.3 of PAL. This release does include v0.9.7.

1.8.0
-----

Expand Down
2 changes: 2 additions & 0 deletions pal.pyx.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ DR2H = cpal.PAL__DR2H
DR2S = cpal.PAL__DR2S
DS2R = cpal.PAL__DS2R

__version__ = @PALPY_VERSION@

def palvers():
"""
versiondict = palvers()
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from support import sst2pydoc as sst
from support import palvers

palpy_version = "1.8.1"

erfa_c = (
"a2af.c", "a2tf.c", "ab.c", "af2a.c", "anp.c", "anpm.c",
"apcg.c", "apcg13.c", "apci.c", "apci13.c", "apco.c",
Expand Down Expand Up @@ -137,6 +139,8 @@
line = line.replace("@MINOR_VERSION@", str(minor))
if line.count("@PATCH_VERSION@"):
line = line.replace("@PATCH_VERSION@", str(patch))
if line.count("@PALPY_VERSION@"):
line = line.replace("@PALPY_VERSION@", '"'+palpy_version+'"')
outfh.write(line)

outfh.close()
Expand All @@ -147,7 +151,7 @@

setup(
name="palpy",
version="1.8.0",
version=palpy_version,
author="Tim Jenness",
author_email="[email protected]",
license="GPL",
Expand Down

0 comments on commit a7ad770

Please sign in to comment.