From d5d167606bdcac8111019406ba4157db06be0590 Mon Sep 17 00:00:00 2001 From: calum-chamberlain Date: Fri, 1 May 2020 17:26:07 +1200 Subject: [PATCH] Add MANIFEST --- MANIFEST.in | 14 ++++++++++++++ setup.py | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..f085bb8 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,14 @@ +# Annoyingly, although the long-description is found by setup.py it is not included +# in pypi's archive of the package, we need to include it here... + +include README.md +include LICENCE.txt +include requirements.txt +recursive-include scripts/* +recursive-include rteqcorrscan +recursive-include docs +recursive-include tests + +# exclude rules +global-exclude *.pyc *.ms *.tgz __pycahce__ +prune docs/build diff --git a/setup.py b/setup.py index 212ba4b..17483af 100644 --- a/setup.py +++ b/setup.py @@ -11,9 +11,11 @@ import os import sys import shutil -import rt_eqcorrscan -VERSION = rt_eqcorrscan.__version__ +with open("rt_eqcorrscan/__init__.py", "r") as init_file: + version_line = [line for line in init_file + if '__version__' in line][0] +VERSION = version_line.split()[-1].split("'")[1] long_description = ''' Real-time EQcorrscan: Real-time wrappers for EQcorrscan's earthquake detection