-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
executable file
·91 lines (74 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
79
80
81
82
83
84
85
86
87
88
89
"""
mgtoolkit: metagraph implementation tool
Note that "python setup.py test" invokes pytest on the package. With appropriately
configured setup.cfg, this will check both xxx_test modules and docstrings.
Copyright 2017, dinesha ranathunga.
Licensed under MIT.
"""
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as test_command
if sys.version_info[:2] != (2, 7):
print("mgtoolkit requires Python 2.7 (%d.%d detected)." %
sys.version_info[:2])
sys.exit(-1)
# This is a plug-in for setuptools that will invoke py.test
# when you run python setup.py test
class PyTest(test_command):
# noinspection PyAttributeOutsideInit
def finalize_options(self):
test_command.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest # import here, because outside the required eggs aren't loaded yet
sys.exit(pytest.main(self.test_args))
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'Click>=6.0',
'configobj==4.7.0',
'pytest==2.7.0',
'numpy==1.10.2'
]
# noinspection PyPep8
setup(
name='mgtoolkit',
version='1.0.7',
description="This is a Python package for implementing metagraphss.",
long_description=readme + '\n\n' + history,
author="Dinesha Ranathunga",
author_email='[email protected]',
url='https://github.com/dinesharanathunga/mgtoolkit',
packages=[
'mgtoolkit',
],
package_dir={'mgtoolkit':
'mgtoolkit'},
include_package_data=True,
install_requires=requirements,
license="MIT license",
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
'Topic :: System :: Networking',
'Topic :: Scientific/Engineering :: Mathematics',
'Programming Language :: Python :: 2.7',
'Natural Language :: English'
],
keywords="mgtoolkit, metagraph implementation, policy analysis",
zip_safe=True,
download_url = 'http://pypi.python.org/pypi/mgtoolkit',
tests_require=['pytest'],
entry_points={
'console_scripts': [
'mgtoolkit = mgtoolkit.console_script:console_entry',
],
}
)