From 724f708204dbe127e1bf82fa787bb6dd31736cc7 Mon Sep 17 00:00:00 2001 From: Ryan Varley Date: Mon, 22 May 2017 21:57:48 +0100 Subject: [PATCH 1/2] setup.py cleanup --- setup.py | 41 +++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/setup.py b/setup.py index 75431f5..c9c7f67 100644 --- a/setup.py +++ b/setup.py @@ -1,44 +1,33 @@ -import codecs import os -import re import numpy from setuptools import setup, find_packages, Extension -here = os.path.abspath(os.path.dirname(__file__)) +VERSION = '1.0.0.dev' +SHORT_DESCRIPTION = """ +Wayne is a instrument simulator primarily for HST WFC3 IR grism spectroscopy. +""" -# Read the version number from a source file. -def find_version(*file_paths): - # Open in Latin-1 so that we avoid encoding errors. - # Use codecs.open for Python 2 compatibility - print os.path.join(here, *file_paths) - with codecs.open(os.path.join(here, *file_paths), 'r', 'latin1') as f: - version_file = f.read() - - # The version line must have the form - # __version__ = 'ver' - version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", - version_file, re.M) - if version_match: - return version_match.group(1) - raise RuntimeError("Unable to find version string.") - - -# Get the long description from the relevant file -with codecs.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: - long_description = f.read() +LONG_DESCRIPTION = """ +Wayne is a telescope simulator used to generate realistic data with most of +the noise sources, reductions and systematics present in real data. Currently +only the HST WFC IR instrument has been implemented. The project has a +particular focus on transmission spectroscopy of exoplanets. +""" # TODO (ryan) scrap req.txt and define versions here or parse it here install_requires = ['docopt', 'numpy', 'scipy', 'matplotlib', 'pysynphot', 'astropy', 'pandas', 'exodata', 'quantities', 'pyfits', 'cython', 'ephem', 'pymc'] +_here = os.path.abspath(os.path.dirname(__file__)) + setup( name="Wayne", - version=find_version('wayne', '__init__.py'), - description="Wayne is a instrument simulator primarily for HST WFC3 IR grism spectroscopy.", - long_description=long_description, + version=VERSION, + description=SHORT_DESCRIPTION, + long_description=LONG_DESCRIPTION, url='https://github.com/ucl-exoplanets/Wayne', author='Ryan Varley', author_email='ryan@ryanvarley.uk', From f82a4ca065108623f728ccb3495b87ec55e7040d Mon Sep 17 00:00:00 2001 From: Ryan Varley Date: Thu, 25 May 2017 22:26:10 +0100 Subject: [PATCH 2/2] cleaned init --- wayne/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wayne/__init__.py b/wayne/__init__.py index 7150501..8b13789 100644 --- a/wayne/__init__.py +++ b/wayne/__init__.py @@ -1,3 +1 @@ -__author__ = 'Ryan Varley, and Angelos Tsiaras' -__version__ = '1.0.0.dev1' -__short_version__ = '1.0.dev' +