forked from NCAR/ldcpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
77 lines (62 loc) · 2.22 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
#!/usr/bin/env python
"""The setup script."""
import os
import sys
from os.path import exists
from setuptools import find_packages, setup
from setuptools.command.install import install
VERSION = 'v0.3'
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
# with open('requirements-dev.txt') as f:
# dev_requires = f.read().strip().split('\n')
if exists('README.rst'):
with open('README.rst') as f:
long_description = f.read()
else:
long_description = ''
CLASSIFIERS = [
'Operating System :: OS Independent',
'Intended Audience :: Science/Research',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Scientific/Engineering',
]
class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""
description = 'verify that the git tag matches our version'
def run(self):
tag = os.getenv('CIRCLE_TAG')
if tag != VERSION:
info = 'Git tag: {0} does not match the version of this app: {1}'.format(tag, VERSION)
sys.exit(info)
setup(
name='ldcpy',
version=VERSION,
description='A library for lossy compression of netCDF files using xarray',
long_description=long_description,
python_requires='>=3.6',
maintainer='Alex Pinard',
maintainer_email='[email protected]',
classifiers=CLASSIFIERS,
url='https://ldcpy.readthedocs.io',
project_urls={
'Documentation': 'https://ldcpy.readthedocs.io',
'Source': 'https://github.com/NCAR/ldcpy',
'Tracker': 'https://github.com/NCAR/ldcpy/issues',
},
packages=find_packages(exclude=('tests',)),
package_dir={'ldcpy': 'ldcpy'},
include_package_data=True,
install_requires=install_requires,
# extras_require={'dev': dev_requires},
license='Apache 2.0',
zip_safe=False,
keywords='compression, xarray',
use_scm_version={'version_scheme': 'post-release', 'local_scheme': 'dirty-tag'},
setup_requires=['setuptools_scm', 'setuptools>=30.3.0'],
cmdclass={'verify': VerifyVersionCommand},
)