forked from onefinestay/taal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
54 lines (44 loc) · 1.59 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
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
make_abs = lambda fn: os.path.join(here, fn)
def parse_requirments(fn, dependency_links):
requirements = []
if not os.path.exists(fn):
return requirements, dependency_links
with open(fn, 'r') as f:
for dep in f:
dep = dep.strip()
# need to make github requirements work with
# setuptools like it would work with `pip -r`
# URLs will not work, so we transform them to
# dependency_links and requirements
if dep.startswith('git+'):
dependency_links.append(dep)
_, dep = dep.rsplit('#egg=', 1)
dep = dep.replace('-', '==', 1)
requirements.append(dep)
return requirements, dependency_links
requirements, dependency_links = parse_requirments(
make_abs('requirements.txt'), [])
setup(
name='taal',
packages=find_packages(exclude=['tests', 'tests.*']),
version='0.8.2',
author='onefinestay',
author_email='engineering@onefinestay.com',
url='https://github.com/onefinestay/taal',
install_requires=requirements,
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Intended Audience :: Developers",
"Natural Language :: English",
"Topic :: Software Development",
"Topic :: Utilities",
],
description='Model translations',
long_description=open(make_abs('README.rst')).read(),
include_package_data=True,
zip_safe=True,
)