-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathsetup.py
67 lines (56 loc) · 2 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import re
from setuptools import setup
VERSIONFILE = "airsea/__init__.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
def read(*filenames, **kwargs):
encoding = kwargs.get('encoding', 'utf-8')
sep = kwargs.get('sep', '\n')
buf = []
for filename in filenames:
with io.open(filename, encoding=encoding) as f:
buf.append(f.read())
return sep.join(buf)
long_description = read('README.md', 'CHANGES.txt')
LICENSE = read('LICENSE.txt')
source = 'http://pypi.python.org/packages/source'
install_requires = ['numpy']
classifiers = """\
Development Status :: 1 - Planning
Environment :: Console
Intended Audience :: Science/Research
Intended Audience :: Developers
Intended Audience :: Education
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python
Topic :: Scientific/Engineering
Topic :: Education
Topic :: Software Development :: Libraries :: Python Modules
"""
config = dict(name='airsea',
version=verstr,
packages=['airsea'],
test_suite='tests',
license=LICENSE,
long_description=long_description,
classifiers=[_f for _f in classifiers.split("\n") if _f],
description='AirSea Libray for Python',
author='Filipe Fernandes',
author_email='[email protected]',
maintainer='Tom Connolly',
maintainer_email='[email protected]',
url='http://pypi.python.org/pypi/airsea/',
# download_url='%s/a/airsea/airsea-%s.tar.gz' % (source, verstr),
platforms='any',
keywords=['oceanography', 'data analysis', 'air-sea'],
install_requires=install_requires)
setup(**config)