From 72fe7e2df801a2c6795153db275feed81c1da2f3 Mon Sep 17 00:00:00 2001 From: Jan Grewe Date: Sat, 8 Aug 2020 13:05:18 +0200 Subject: [PATCH] [setup] improvements --- fishbook/package_info.json | 9 +++++++++ setup.py | 33 +++++++++++++++++++++------------ 2 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 fishbook/package_info.json diff --git a/fishbook/package_info.json b/fishbook/package_info.json new file mode 100644 index 0000000..7ae6817 --- /dev/null +++ b/fishbook/package_info.json @@ -0,0 +1,9 @@ +{ + "VERSION": "0.2.dev", + "STATUS": "developlemt", + "AUTHOR": "Jan Grewe", + "COPYRIGHT": "2020, Neuroethology group, Uni Tübingen, Jan Grewe", + "CONTACT": "jan.grewe@g-node.org", + "BRIEF": "Database providing an overview of the electrophysiological data recorded in the group.", + "HOMEPAGE": "https://whale.am28.uni-tuebingen.de/fishbook" +} \ No newline at end of file diff --git a/setup.py b/setup.py index b58944e..43eef55 100644 --- a/setup.py +++ b/setup.py @@ -1,20 +1,29 @@ +import os +import sys +import json from distutils.core import setup from setuptools import find_packages -import sys assert(sys.version_info >= (3, 0)) -__version__ = 0.1 -# exec(open('fishbook/version.py').read()) +with open(os.path.join("fishbook", "package_info.json")) as infofile: + infodict = json.load(infofile) + +VERSION = infodict["VERSION"] +AUTHOR = infodict["AUTHOR"] +CONTACT = infodict["CONTACT"] +BRIEF = infodict["BRIEF"] +HOMEPAGE = infodict["HOMEPAGE"] -requires = ['datajoint', 'nixio', 'numpy', 'PyYAML', 'scipy', 'tqdm', 'backports-datetime-fromisoformat'] -print(find_packages(exclude=['contrib', 'doc', 'tests*', 'site'])) +requirements = ['datajoint', 'nixio', 'numpy', 'PyYAML', 'scipy', 'tqdm', 'backports-datetime-fromisoformat'] setup(name='fishbook', - version = __version__, - packages = find_packages(exclude=['contrib', 'doc', 'tests*']), - description = 'Database providing an overview of the electrophysiological data recorded in the group.', - author = 'Jan Grewe', - install_requires = requires if sys.version_info < (3,7) else requires[:-1], - entry_points = {'console_scripts': [ - 'fishbook-import=fishbook.cmd.data_import:main']} + version = VERSION, + packages = find_packages(exclude=['doc*', 'tests*', 'site']), + description = BRIEF, + author = AUTHOR, + author_email=CONTACT, + url=HOMEPAGE, + license="GPLv3", + install_requires = requirements if sys.version_info < (3,7) else requirements[:-1], + entry_points = {'console_scripts': ['fishbook-import=fishbook.cmd.data_import:main']} )