-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
68 lines (57 loc) · 1.83 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
#!/usr/bin/env python3
"""
Setup for food_boss (python3).
"""
from __future__ import print_function
# core python libraries
import distutils
import distutils.cmd
import distutils.core
import os
import setuptools
# third party libraries
import versioneer
# custom libraries
# Basic info.
_PACKAGE_NAME = 'food_boss'
_BASE_DIR = os.path.dirname(os.path.abspath(__file__))
_LIB_DIR = 'lib'
setup_args = {}
setup_args['name'] = _PACKAGE_NAME
setup_args['packages'] = setuptools.find_packages(exclude=['tests'])
setup_args['version'] = versioneer.get_version()
setup_args['test_suite'] = 'nose.collector'
setup_args['setup_requires'] = ['nose>=1.0']
setup_args['author'] = 'Craig Sebenik'
setup_args['author_email'] = 'craig5@users.noreply.github.com'
setup_args['description'] = 'Food Boss - recipe manager'
setup_args['url'] = 'http://www.friedserver.com/'
setup_args['keywords'] = ['food', 'recipes']
setup_args['license'] = 'Apache License 2.0'
class InfoCommand(distutils.cmd.Command):
"""Get info about this project."""
description = 'Get info about this project (e.g. setup args).'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
"""Info about this project."""
print('Setup args:')
data = []
data.append({'title': 'Version', 'value': setup_args['version']})
for cur in data:
print(' {title}: {value}'.format(**cur))
setup_args['cmdclass'] = versioneer.get_cmdclass()
setup_args['cmdclass']['info'] = InfoCommand
setup_args['package_dir'] = {'': _LIB_DIR}
setup_args['entry_points'] = {
'console_scripts': [
'food_boss = food_boss.scripts:FoodBossCli.main_static'
]
}
if __name__ == '__main__':
# Stupid distutils doesn't support 'entry_points'.
setuptools.setup(**setup_args)
# End of file.