From 3f4cdf4ed5b37feff8c4ac964c6d4f370d0e4034 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Tue, 2 May 2017 14:28:20 -0700 Subject: [PATCH 1/2] Set the Python module version number Python can now determine the version number of palpy in addition to the version of the underlying PAL library. __version__ package attribute is now set. --- pal.pyx.in | 2 ++ setup.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pal.pyx.in b/pal.pyx.in index fefd2ec..99fef58 100644 --- a/pal.pyx.in +++ b/pal.pyx.in @@ -35,6 +35,8 @@ DR2H = cpal.PAL__DR2H DR2S = cpal.PAL__DR2S DS2R = cpal.PAL__DS2R +__version__ = @PALPY_VERSION@ + def palvers(): """ versiondict = palvers() diff --git a/setup.py b/setup.py index 5d12b59..0d33e8e 100644 --- a/setup.py +++ b/setup.py @@ -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", @@ -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() @@ -147,7 +151,7 @@ setup( name="palpy", - version="1.8.0", + version=palpy_version, author="Tim Jenness", author_email="tim.jenness@gmail.com", license="GPL", From 3d15d7fdee1b7567ac376f922aef335a05dc468f Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Tue, 2 May 2017 14:32:06 -0700 Subject: [PATCH 2/2] Update release notes for 1.8.1 --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index daf07ee..938a720 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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 -----