forked from cedadev/nappy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
74 lines (61 loc) · 2.12 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
# BSD Licence
# Copyright (c) 2010, Science & Technology Facilities Council (STFC)
# All rights reserved.
#
# See the LICENSE file in the source distribution of this software for
# the full license text.
import io
import os
from setuptools import setup, find_packages
from nappy import __version__
def read(filename, encoding='utf-8'):
"""read file contents"""
full_path = os.path.join(os.path.dirname(__file__), filename)
with io.open(full_path, encoding=encoding) as fh:
contents = fh.read().strip()
return contents
def license():
return read('LICENSE')
if os.path.exists('MANIFEST'):
os.unlink('MANIFEST')
try:
import pypandoc
LONG_DESCRIPTION = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError, OSError):
LONG_DESCRIPTION='A python package for reading/writing NASA Ames files, writing NASA Ames-style CSV files and converting to/from NetCDF (if CDMS enabled)'
setup(
name='nappy',
version=__version__,
description='NASA Ames Processing in Python',
long_description=LONG_DESCRIPTION,
keywords='Python CSV NASA Ames NetCDF convert CDMS',
author='Ag Stephens',
author_email='[email protected]',
url='https://github.com/cedadev/nappy',
license=license(),
platforms='all',
# We make the package non-zip_safe so that we don't need to
# change the way ini files are read too much.
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=read('requirements.txt').splitlines(),
tests_require=read('requirements-dev.txt').splitlines(),
test_suite='nose.collector',
entry_points={
'console_scripts': [
'na2nc=nappy.script.na2nc:na2nc',
'nc2na=nappy.script.nc2na:nc2na',
'nc2csv=nappy.script.nc2csv:nc2csv'
]
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python'
],
)