-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
72 lines (63 loc) · 2.12 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
"""Setup for Boatwright."""
from setuptools import setup, Command
import os
import re
VERSIONFILE = "boatwright/__init__.py"
verfilestr = open(VERSIONFILE, "rt").read()
match = re.search(r"^__version__ = '(\d\.\d.\d+(\.\d+)?)'", verfilestr, re.MULTILINE)
if match:
version = match.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE))
class Coverage(Command):
"""Class to allow coverage run from setup."""
description = "run coverage"
user_options = []
def initialize_options(self):
"""Empty initialize_options."""
pass
def finalize_options(self):
"""Empty finalize_options."""
pass
def run(self):
"""Run coverage program."""
os.system("coverage run --source=boatwright setup.py test")
os.system("coverage report")
os.system("coverage html")
print("See htmlcov/index.html for details.")
setup(
name='boatwright',
version=version,
author='Simeon Warner',
author_email='[email protected]',
packages=['boatwright'],
package_data={},
scripts=['loft.py'],
classifiers=["Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: "
"GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Libraries :: Python Modules"],
url='https://github.com/zimeon/boatwright',
license='LICENSE.txt',
description='Boatwright boat design code',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
install_requires=[
'numpy>=1.19.4',
'scipy>=1.5.4',
'matplotlib>=1.15.0'
],
test_suite="tests",
tests_require=[
],
cmdclass={
'coverage': Coverage,
},
)