-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
75 lines (64 loc) · 2.49 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from setuptools import setup
import versioneer # that's a local versioneer.py script from this repo
def _check_requirements():
"""Prepare a list of requirements to be passed to setup().
We don't want to add required libraries to ``install_requires``
unconditionally, because then we would risk updating an installed
numpy/xarray/netCDF4/..., which is prone to cause trouble. So we try to
import the requirements first and only add them to the ``_requires`` in
case they are not installed. See
"""
requirements = []
try:
import numpy
except ImportError:
requirements += ['numpy>=1.7']
try:
import xarray
except ImportError:
requirements += ['xarray>=0.8']
try:
import netCDF4
except ImportError:
requirements += ['netCDF4>=1.2.1']
return requirements
setup(name='emiprep',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description=('(yet another) emission pre-processor for '
'atmospheric chemistry models'),
url='https://gitlab.com/andreas-h/emiprep/',
author='Andreas Hilboll',
author_email='[email protected]',
license='AGPLv3',
classifiers=[
# How mature is this project? Common values are
'Development Status :: 1 - Planning',
# Indicate who your project is intended for
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Atmospheric Science',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: GNU Affero General Public License v3',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
# Specify operating system
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS',
],
packages=['emiprep'],
install_requires=_check_requirements(),
setup_requires=[
'pytest-runner',
],
tests_require=[
'pytest',
'pytest-cov',
'pytest-flake8',
],
zip_safe=False)