-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup.py
57 lines (48 loc) · 1.41 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
from setuptools import setup, find_packages
import os
CLASSIFIERS = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
EXTRAS_REQUIRE = {
'dev': [
'bump2version',
'setuptools',
'twine'
]
}
INSTALL_REQUIRES = [
'requests>= 2.18, < 3',
'cached_property >= 1.5, < 2',
'inflection == 0.4',
'requests-ratelimiter == 0.7.0',
]
def get_about(here):
about = {}
about_info_path = os.path.join(here, 'src', 'bookstack', '__version__.py')
with open(about_info_path,'r', encoding='utf-8' ) as f:
exec(f.read(), about)
return about
def get_long_description(here):
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
return long_description
here = os.path.abspath(os.path.dirname(__file__))
about = get_about(here)
setup(
name=about['__title__'],
version=about['__version__'],
url=about['__url__'],
description=about['__description__'],
long_description=get_long_description(here),
author=about['__author__'],
author_email=about['__author_email__'],
long_description_content_type='text/markdown',
packages=find_packages('src'),
package_dir={'': 'src'},
python_requires='>=3.6',
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
classifiers=CLASSIFIERS
)