Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·102 lines (87 loc) · 2.67 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·102 lines (87 loc) · 2.67 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read().replace('.. :changelog:', '')
try:
import rstcheck
found_errors = False
readme_errors = list(rstcheck.check(readme))
if len(readme_errors) > 0:
sys.stderr.write('\nErrors in README.rst [(line #, error)]\n' +
str(readme_errors) + '\n')
found_errors = True
history_errors = list(rstcheck.check(history))
if len(history_errors) > 0:
sys.stderr.write('\nErrors in HISTORY.rst [(line #, error)]\n' +
str(history_errors) + '\n')
found_errors = True
if 'sdist' in sys.argv or 'bdist_wheel' in sys.argv:
if found_errors is True:
sys.stderr.write('\n\nEXITING due to errors encountered in'
' History.rst or Readme.rst.\n\nSee errors above\n\n')
sys.exit(1)
except Exception as e:
sys.stderr.write('WARNING: rstcheck library found, '
'unable to validate README.rst or HISTORY.rst\n')
requirements = [
"argparse",
"numpy",
"pandas",
"matplotlib",
"scipy",
"docopt"
]
test_requirements = [
"argparse",
"numpy",
"pandas",
"matplotlib",
"scipy",
"docopt",
"mock",
"unittest2"
]
setup(
name='modelevaltoolkit',
version='0.1.0',
description='Model Evaluation Toolkit',
long_description=readme + '\n\n' + history,
author='Pat Walters <add@email.com>',
author_email='need@toaddemail.com',
url='https://github.com/PatWalters/metk',
packages=[
'modelevaltoolkit'
],
package_dir={'modelevaltoolkit':
'modelevaltoolkit'},
include_package_data=True,
install_requires=requirements,
license="Other",
zip_safe=False,
keywords='metk',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Science/Research',
'License :: Free for non-commercial use',
'Natural Language :: English',
'Environment :: Console',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering :: Chemistry'
],
scripts = ['modelevaltoolkit/metk.py',
'modelevaltoolkit/metk_plots.py',
'modelevaltoolkit/metk_report.py',
'modelevaltoolkit/metk_util.py'
],
test_suite='tests',
tests_require=test_requirements
)