-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
77 lines (65 loc) · 2.47 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
'''
out - Simple logging with a few fun features.
© 2018-25, Mike Miller - Released under the LGPL, version 3+.
'''
import sys
from os.path import dirname, join
from setuptools import setup
if sys.version_info.major < 3:
raise NotImplementedError('Sorry, only Python 3 and above is supported.')
# additional metadata, requirements
keywords = 'log logging events levels color terminal console standard out err '
install_requires = (
'console>0.9902',
'colorama; os_name == "nt" and platform_version < "10.0.10586" ',
)
tests_require = ('pyflakes', 'readme_renderer'),
extras_require = dict(
highlight=('pygments>=2.4.0',),
)
def get_version(filename, version='1.00'):
''' Read version as text to avoid machinations at import time. '''
with open(filename) as infile:
for line in infile:
if line.startswith('__version__'):
try:
version = line.split("'")[1]
except IndexError:
pass
break
return version
def slurp(filename):
try:
with open(join(dirname(__file__), filename), encoding='utf8') as infile:
return infile.read()
except FileNotFoundError:
pass # needed at upload time, not install time
setup(
name = 'out',
description = 'Fun take on logging for non-huge projects.'
' Gets "outta" the way.',
author_email = '[email protected]',
author = 'Mike Miller',
keywords = keywords,
license = 'LGPL 3',
long_description = slurp('README.rst'),
long_description_content_type = 'text/x-rst',
packages = ('out',),
url = 'https://github.com/mixmastamyk/out',
version = get_version('out/__init__.py'),
extras_require = extras_require,
install_requires = install_requires,
python_requires = '>=3.8',
setup_requires = install_requires,
tests_require = tests_require,
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries',
],
)