Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.