forked from Delgan/loguru
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
53 lines (48 loc) · 1.51 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
import os
import re
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
with open('loguru/__init__.py', 'r') as file:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
file.read(), re.MULTILINE).group(1)
with open('README.rst', 'rb') as file:
readme = file.read().decode('utf-8')
LOGURU_EXTENSIONS = os.getenv("LOGURU_EXTENSIONS", None)
if LOGURU_EXTENSIONS == "0":
ext_modules = []
else:
optional = LOGURU_EXTENSIONS != "1"
ext_modules = [
Extension('loguru._extensions.fast_now', sources=['loguru/_extensions/fast_now.c'], optional=optional),
]
setup(
name='loguru',
version=version,
description='Python logging made (stupidly) simple',
long_description=readme,
author='Delgan',
author_email='delgan.py@gmail.com',
url='https://github.com/Delgan/loguru',
download_url='https://github.com/Delgan/loguru/archive/{}.tar.gz'.format(version),
keywords=['loguru', 'logging', 'logger', 'log', 'parser', 'notifier'],
license="MIT license",
install_requires=[
'ansimarkup>=1.3.0',
'base36>=0.1.1',
'better_exceptions_fork>=0.2.1.post5',
'colorama>=0.3.9',
'notifiers>=0.7.4',
'pendulum>=2.0.1',
],
extras_require={
'dev': [
'coveralls>=1.3.0',
'pytest>=3.5.0',
'pytest-benchmark>=3.1.1',
'pytest-cov>=2.5.1',
],
},
ext_modules=ext_modules,
)