-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
78 lines (68 loc) · 2.49 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
#!/usr/bin/env python
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import os.path as osp
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ''
def run_tests(self):
import shlex
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
def readme():
with open('README.rst') as f:
return f.read()
def main():
setup(name='EMPD-admin',
version='0.0.1.dev0',
description='Automatic adminstrator of the EMPD',
long_description=readme(),
author='Philipp S. Sommer',
author_email='philipp.sommer@unil.ch',
url='https://github.com/EMPD2/EMPD-admin',
entry_points=dict(
console_scripts=['empd-admin = empd_admin.__main__:main']),
packages=find_packages(),
package_data={'empd_admin': [
osp.join('empd_admin', 'data', 'tests', '*.py'),
osp.join('empd_admin', 'data', 'tests', 'pytest.ini'),
osp.join('empd_admin', 'data', 'meta.tsv'),
osp.join('empd_admin', 'data', 'postgres', 'scripts', '*.py'),
osp.join('empd_admin', 'data', 'postgres', 'scripts', '*.sql'),
osp.join('empd_admin', 'data', 'postgres', 'scripts', '*.xlsx'),
osp.join('empd_admin', 'data', 'postgres', 'scripts', 'tables',
'*.tsv'),
]},
include_package_data=True,
install_requires=[
'tornado',
'PyGithub',
'gitpython',
'pytest',
'pandas',
'netCDF4',
'shapely',
'sqlalchemy',
'psycopg2',
'requests',
'geopandas',
'PyYAML',
],
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: Python :: 3.7',
'Operating System :: Unix',
],
license="GPLv3",
tests_require=['pytest', 'psutil'],
cmdclass={'test': PyTest},
)
if __name__ == '__main__':
main()