-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
60 lines (51 loc) · 1.61 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
#!/usr/bin/env python3
"""
Python build setup.
"""
import os
from setuptools import setup, find_packages, Command
class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info .eggs .pytest_cache')
CURR_DIR = os.path.abspath(os.path.dirname(__file__))
PACKAGES = ['lib', 'constants']
ABOUT = {}
with open(os.path.join(
CURR_DIR, '__version__.py'), 'r', encoding="utf-8") as f:
exec(f.read(), ABOUT) # pylint: disable=W0122
with open('README.md', 'r', encoding='utf-8') as f:
README = f.read()
with open('requirements.txt') as f:
REQUIRES = f.read().splitlines()
setup(
name=ABOUT['__title__'],
version=ABOUT['__version__'],
description=ABOUT['__description__'],
long_description=README,
author=ABOUT['__author__'],
author_email=ABOUT['__author_email__'],
packages=find_packages(exclude=['tests']),
package_dir={'lib': 'lib', 'constants': 'constants'},
install_requires=REQUIRES,
zip_safe=False,
classifiers=(
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3.7'
'Programming Language :: Python :: Implementation :: CPython'
),
cmdclass={
'clean': CleanCommand,
},
setup_requires=['pytest-runner'],
tests_require=['pytest'],
use_2to3=False
)