-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
63 lines (51 loc) · 1.79 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
"""
Note that bulk of the configuration is in the package.cfg file
"""
try:
import ConfigParser as configparser
except ImportError:
import configparser
import os.path
from pprint import pprint
from setuptools import setup, find_packages
BASEDIR = os.path.dirname(__file__)
requirements = []
with open(os.path.join(BASEDIR, 'requirements.txt'), "r") as f:
requirements = f.readlines()
with open("README.md", "r") as fh:
long_description = fh.read()
# Read Package info from a CONFIG file package.cfg
CONFIG = configparser.ConfigParser({})
CONFIG.add_section("Package")
CONFIG.add_section("FindPackages")
CONFIG.read(os.path.join(BASEDIR, 'package.cfg'))
PKG_INFO = dict(CONFIG.items('Package'))
FIND_PKGS = dict(CONFIG.items('FindPackages'))
for item in ['include', 'exclude']:
if item in FIND_PKGS:
FIND_PKGS[item] = FIND_PKGS[item].split(',')
PKG_INFO.update({
'packages': find_packages(**(FIND_PKGS)),
'package_dir': {'': 'src'},
'package_data': {'': ['/package.cfg*']},
'install_requires': [req.strip() for req in requirements if not req.startswith('#')],
'long_description': long_description,
'long_description_content_type': "text/markdown",
'classifiers': [
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
'entry_points': {
'console_scripts': [
'fredlock = fredlock.cli:cli',
],
}
})
setup(**PKG_INFO)