-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
67 lines (55 loc) · 1.9 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
import os
import setuptools
PACKAGES = ["loggingex", "loggingex.context", "loggingex.wsgi"]
def main():
return setuptools.setup(
author="Paulius Maruška",
author_email="[email protected]",
name="loggingex",
url="https://github.com/open-things/loggingex/",
packages=PACKAGES,
package_dir={"": "src"},
description="Logging Extensions",
long_description=read_file("README.rst"),
license="MIT",
zip_safe=False,
use_scm_version={
"write_to": "src/loggingex/_version.py",
"write_to_template": VERSION_FILE_TEMPLATE,
},
setup_requires=SETUP_REQUIRES,
python_requires=">=3.5",
install_requires=INSTALL_REQUIRES,
classifiers=CLASSIFIERS,
)
SETUP_REQUIRES = ["setuptools_scm"]
INSTALL_REQUIRES = ['contextvars;python_version<"3.7"']
VERSION_FILE_TEMPLATE = """\
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = "{version}"
"""
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries",
"Topic :: System :: Logging",
]
def read_file(name):
"""Return contents of a file as text, relative to this file."""
full_path = os.path.join(os.path.dirname(__file__), name)
with open(full_path, "r") as f:
return f.read()
if __name__ == "__main__":
main()