-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
48 lines (39 loc) · 1.4 KB
/
setup.py
File metadata and controls
48 lines (39 loc) · 1.4 KB
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
import os
from setuptools import setup, find_packages, findall
def get_version():
with open(os.path.join(thisdir, 'VERSION'), 'r') as fh:
return fh.readline().strip()
def get_requires(filename='requirements.txt'):
requires = []
with open(os.path.join(thisdir, filename), 'r') as fh:
for line in fh.readlines():
requires += [ line.strip() ]
return requires
thisdir = os.path.dirname(os.path.realpath(__file__))
# parse version number from text file
VERSION = get_version()
# find packages and binaries
ALL_PACKAGES = find_packages()
SCRIPTS = findall('bin')
# parse requirements from text files
ALL_INSTALL_REQUIRES = get_requires()
ALL_TEST_REQUIRES = get_requires('test_requirements.txt')
ALL_SETUP_REQUIRES = get_requires('setup_requirements.txt')
setup(
name='logging_yamlconfig',
version=VERSION,
description='Python dictconfig helpers for yaml config files',
author='IBM',
author_email='jdye@us.ibm.com',
url='https://github.com/dyejon/python_logging_yamlconfig',
download_url='https://github.com/dyejon/python_logging_yamlconfig/tarball/%s' % VERSION,
packages=ALL_PACKAGES,
provides=ALL_PACKAGES,
scripts=SCRIPTS,
include_package_data=True,
setup_requires=ALL_SETUP_REQUIRES,
install_requires=ALL_INSTALL_REQUIRES,
tests_require=ALL_TEST_REQUIRES,
test_suite='nose.collector'
)
# vim: set ts=4 sw=4 expandtab: