-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
37 lines (32 loc) · 1.2 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
from setuptools import setup, find_packages
tolines = lambda c: filter(None, map(lambda s: s.strip(), c.split('\n')))
def read(filename, flt=None):
with open(filename) as f:
content = f.read().strip()
return flt(content) if callable(flt) else content
def requirements_filter(c):
install_requires = []
for requirement in tolines(c):
_pound_pos = requirement.find('#')
if _pound_pos != -1:
requirement = requirement[0:_pound_pos].strip()
if len(requirement):
install_requires.append(requirement)
return install_requires
version = read('version.txt')
setup(
name='rdc.common',
namespace_packages = ['rdc'],
version=version,
description="Common tools",
long_description=read('README.rst'),
classifiers=read('classifiers.txt', tolines),
author='Romain Dorgueil',
author_email='[email protected]',
url='http://common.rdc.li/',
download_url='https://github.com/rdcli/rdc.common/tarball/' + version,
license='Apache License, Version 2.0',
packages=find_packages(exclude=['ez_setup', 'example', 'test']),
include_package_data=True,
install_requires=read('requirements.txt', requirements_filter),
)