-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
executable file
·92 lines (83 loc) · 3.9 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.install import install
from esgprep.utils.constants import VERSION
class InstallCommand(install):
"""
Adds the --build-for-conda option to the install arguments
"""
user_options = install.user_options + [
('build-for-conda', None, None),
]
def initialize_options(self):
install.initialize_options(self)
self.build_for_conda = None
def finalize_options(self):
install.finalize_options(self)
def run(self):
install.run(self)
# run setup, but with conda handling all the dependencies
if '--build-for-conda' in sys.argv:
setup(name='esgprep',
cmdclass={'install': InstallCommand},
version=VERSION,
description='Toolbox to prepare data for ESGF publication',
author='Levavasseur Guillaume',
author_email='glipsl@ipsl.fr',
url='https://github.com/ESGF/esgf-prepare',
packages=find_packages(),
include_package_data=True,
platforms=['Unix'],
zip_safe=False,
entry_points={'console_scripts': ['esgmapfile=esgprep.esgmapfile:main',
'esgdrs=esgprep.esgdrs:main',
'esgfetchini=esgprep.esgfetchini:main',
'esgfetchtables=esgprep.esgfetchtables:main',
'esgcheckvocab=esgprep.esgcheckvocab:main']},
classifiers=['Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Science/Research',
'Intended Audience :: System Administrators',
'Natural Language :: English',
'Operating System :: Unix',
'Programming Language :: Python',
'Topic :: Scientific/Engineering',
'Topic :: Software Development :: Build Tools'])
# normal pip install process
else:
setup(name='esgprep',
cmdclass={'install': InstallCommand},
version=VERSION,
description='Toolbox to prepare data for ESGF publication',
author='Levavasseur Guillaume',
author_email='glipsl@ipsl.fr',
url='https://github.com/ESGF/esgf-prepare',
packages=find_packages(),
include_package_data=True,
python_requires='>=2.7, <3.0',
install_requires=['lockfile==0.12.2',
'cftime==1.0.3.4',
'esgconfigparser==0.1.17',
'requests==2.20.0',
'fuzzywuzzy==0.16.0',
'netCDF4==1.4.0',
'hurry.filesize==0.9',
'treelib==1.4.0'],
platforms=['Unix'],
zip_safe=False,
entry_points={'console_scripts': ['esgmapfile=esgprep.esgmapfile:main',
'esgdrs=esgprep.esgdrs:main',
'esgfetchini=esgprep.esgfetchini:main',
'esgfetchtables=esgprep.esgfetchtables:main',
'esgcheckvocab=esgprep.esgcheckvocab:main']},
classifiers=['Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Science/Research',
'Intended Audience :: System Administrators',
'Natural Language :: English',
'Operating System :: Unix',
'Programming Language :: Python',
'Topic :: Scientific/Engineering',
'Topic :: Software Development :: Build Tools'])