forked from LUXROBO/pymodi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
56 lines (51 loc) · 1.89 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
from os import path
from io import open
from setuptools import setup, find_packages
def get_spec(filename: str, mode: str = "r"):
def wrapper():
here = path.dirname(__file__)
result = {}
with open(path.join(here, filename), encoding='utf8') as src_file:
if mode == 'd':
exec(src_file.read(), result)
else:
result = src_file.read()
return result
return wrapper
get_about = get_spec('./modi/about.py', 'd')
get_readme = get_spec('README.md')
get_history = get_spec('HISTORY.md')
get_requirements = get_spec('requirements.txt')
about = get_about()
setup(
name=about['__title__'],
version=about['__version__'],
author=about['__author__'],
author_email=about['__email__'],
description=about['__summary__'],
long_description=get_readme() + '\n' + get_history(),
long_description_content_type="text/markdown",
install_requires=get_requirements(),
license=about['__license__'],
include_package_data=True,
keywords=["python", "modi"],
packages=find_packages(include=['modi', 'modi.util', 'modi.task',
'modi.module',
'modi.module.setup_module',
'modi.module.input_module',
'modi.module.output_module']),
test_suite="tests",
url=about['__url__'],
classifiers=[
"Natural Language :: English",
"Intended Audience :: Developers",
"Intended Audience :: Education",
'Intended Audience :: Information Technology',
'Intended Audience :: Science/Research',
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"License :: OSI Approved :: MIT License",
],
)