Skip to content

Commit

Permalink
Merge pull request #7 from bjlittle/alpha-version
Browse files Browse the repository at this point in the history
Tidy setup.py and pin to first alpha version.
  • Loading branch information
lbdreyer authored Feb 9, 2017
2 parents 2b3f790 + 9bd85f1 commit ec72897
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 24 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ install:

# Now do the things we need to do to install it.
- conda create -n test_env --file requirements.txt nose python=${PYTHON} ${EXTRA_DEPS} --yes --quiet
- conda list
- source activate test_env
- python setup.py build_ext install
- mkdir not_the_source_root && cd not_the_source_root
Expand Down
70 changes: 46 additions & 24 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,57 @@
from Cython.Build import cythonize


extensions = [Extension('stratify._vinterp',
['stratify/_vinterp.pyx'],
NAME = 'stratify'
DIR = os.path.abspath(os.path.dirname(__file__))

extensions = [Extension('{}._vinterp'.format(NAME),
[os.path.join(NAME, '_vinterp.pyx')],
include_dirs=[np.get_include()])]

setup(
name='stratify',
description='Vectorized interpolators that are especially useful for Nd vertical interpolation/stratification of atmospheric and oceanographic datasets',
version='0.3.0',

def extract_version():
version = None
fname = os.path.join(DIR, NAME, '__init__.py')
with open(fname) as fd:
for line in fd:
if (line.startswith('__version__')):
_, version = line.split('=')
version = version.strip()[1:-1] # Remove quotations
break
return version


setup_args = dict(
name=NAME,
description=('Vectorized interpolators that are especially useful for '
'Nd vertical interpolation/stratification of atmospheric '
'and oceanographic datasets'),
version=extract_version(),
ext_modules=cythonize(extensions),
packages=find_packages(),
classifiers=[
'Development Status :: 3 - Alpha',
('License :: OSI Approved :: '
'License :: OSI Approved :: BSD License'),
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
'Operating System :: POSIX :: AIX',
'Operating System :: POSIX :: Linux',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: GIS',
'Development Status :: 3 - Alpha',
('License :: OSI Approved :: '
'License :: OSI Approved :: BSD License'),
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
'Operating System :: POSIX :: AIX',
'Operating System :: POSIX :: Linux',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: GIS',
],
extras_require={'test': ['nose'],
},
extras_require={'test': ['nose']},
test_suite='{}.tests'.format(NAME),
zip_safe=False,
)


if __name__ == '__main__':
setup(**setup_args)
1 change: 1 addition & 0 deletions stratify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
EXTRAPOLATE_LINEAR, PyFuncExtrapolator,
PyFuncInterpolator)

__version__ = '0.1a0'

0 comments on commit ec72897

Please sign in to comment.