From 313e405eae2f97a69d503b24211c949fe64c99c4 Mon Sep 17 00:00:00 2001 From: Chris Calloway Date: Thu, 2 Apr 2015 20:36:52 -0400 Subject: [PATCH] Added VERSION.txt and download_url. --- HISTORY.txt | 2 ++ VERSION.txt | 1 + setup.py | 20 ++++++++++++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 VERSION.txt diff --git a/HISTORY.txt b/HISTORY.txt index cea906e..c0aae2f 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -2,6 +2,8 @@ Version 1.4.3 2015-04-02 ------------------------------- - Refactor functions into module. (cbc) - Refactor main namespace in tests. (cbc) +- Added VERSIONS.txt. (cbc) +- Added download_url to setup. (cbc) Version 1.4.2 2015-04-01 ------------------------------- diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 0000000..428b770 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +1.4.3 diff --git a/setup.py b/setup.py index b707c06..e3595e4 100755 --- a/setup.py +++ b/setup.py @@ -5,15 +5,26 @@ from setuptools import setup from setuptools import find_packages -__version__ = "1.4.3" + +def version(): + """Get the version number.""" + + with open("VERSION.txt") as v: + _version = v.read() + return _version.strip() + + +__version__ = version() def long_description(): + """Construct the long description text.""" + with open("README.rst") as r: - ld1 = r.read() + long_description_1 = r.read() with open("HISTORY.txt") as h: - ld2 = h.read() - return "\n".join([ld1, ld2, ]) + long_description_2 = h.read() + return "\n".join([long_description_1, long_description_2, ]) setup(name="primer", @@ -25,6 +36,7 @@ def long_description(): description="A primer for prime numbers", long_description=long_description(), url="https://github.com/cbcunc/primer", + download_url="https://github.com/cbcunc/primer/tarball/" + __version__, keywords="Prime number primes primorial", classifiers=["Development Status :: 5 - Production/Stable", "License :: OSI Approved :: "