-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
60 lines (52 loc) · 1.69 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
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
try:
about = {}
with open(os.path.join(here, 'package_name', '__version__.py'), 'r',
encoding='utf-8') as f:
exec(f.read(), about)
except FileNotFoundError:
raise RuntimeError('No package and version info found.')
try:
with open(os.path.join(here, 'README.md'), 'r',
encoding='utf-8') as f:
long_description = '\n' + f.read()
except FileNotFoundError:
long_description = about['__description__']
try:
with open(os.path.join(here, 'requirements_locked.txt')) as f:
install_requires = f.readlines()
except FileNotFoundError:
raise RuntimeError('No requirements info found.')
setup(
name=about['__name__'],
description=about['__description__'],
long_description=long_description,
long_description_content_type='text/markdown',
version=about['__version__'],
author=about['__author__'],
license=about['__license__'],
url=about['__url__'],
packages=find_packages(exclude=['tests', 'tests.*'], where='.'),
# package_dir={'': '.'},
# py_modules=['mypackage'], # if not a package but individual modules
# entry_points={
# 'console_scripts': [
# 'package_name=app:main',
# ],
# },
# scripts=[
# 'scripts/script.py',
# ],
# package_data={
# 'package_name': ['package_data.dat'],
# },
# data_files=[('my_data', ['data/data_file'])],
install_requires=install_requires,
python_requires='>=3.8',
include_package_data=True,
zip_safe=False,
classifiers=about['__classifiers__'],
keywords=about['__keywords__'],
)