-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
78 lines (57 loc) · 2.06 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
import io
from os.path import abspath, dirname, join
from shutil import rmtree
from setuptools import find_packages, setup
root_dir = abspath(dirname(__file__))
dist_dir = join(root_dir, 'dist')
build_dir = join(root_dir, 'build')
src_dir = join(root_dir, 'src')
package_dir = join(src_dir, 'yaml_tags')
def cleanup():
rmtree(build_dir, ignore_errors=True)
rmtree(dist_dir, ignore_errors=True)
def get_about():
with io.open(join(package_dir, '__about__.py'), encoding='utf-8') as f:
about = {}
exec(f.read(), about)
return about
def setup_package():
cleanup()
about = get_about()
setup(
packages=find_packages('src'),
package_dir={'': 'src'},
use_scm_version={
'version_scheme': 'guess-next-dev',
'write_to': 'src/yaml_tags/__version__.py',
},
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
setup_requires=[
'pytest-runner', 'setuptools_scm', 'setuptools_scm_git_archive'
],
tests_require=['pytest'],
test_suite='tests',
name=about['__title__'],
description=about['__summary__'],
author=about['__author__'],
author_email=about['__email__'],
url=about['__uri__'],
license=about['__license__'],
classifiers=[
'License :: OSI Approved :: MIT License',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Text Processing :: Markup',
],
)
if __name__ == '__main__':
setup_package()