forked from ioos/pyoos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
66 lines (55 loc) · 2.05 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
from __future__ import (absolute_import, division, print_function)
from __future__ import with_statement
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
def extract_version(module='pyoos'):
version = None
fdir = os.path.dirname(__file__)
fnme = os.path.join(fdir, module, '__init__.py')
with open(fnme) as fd:
for line in fd:
if (line.startswith('__version__')):
_, version = line.split('=')
# Remove quotation characters.
version = version.strip()[1:-1]
break
return version
def readme():
with open('README.rst') as f:
return f.read()
reqs = [line.strip() for line in open('requirements.txt')]
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name = 'pyoos',
version = extract_version(),
description = 'A Python library for collecting Met/Ocean observations',
long_description = readme(),
license = 'GPLv3',
author = 'Kyle Wilcox',
author_email = '[email protected]',
url = 'https://github.com/ioos/pyoos.git',
packages = find_packages(exclude=['tests.*', 'tests']),
install_requires = reqs,
tests_require = ['pytest'],
cmdclass = {'test': PyTest},
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Topic :: Scientific/Engineering',
],
include_package_data = True,
)