-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
46 lines (36 loc) · 1.39 KB
/
setup.py
File metadata and controls
46 lines (36 loc) · 1.39 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
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='adyen-notification-proxy',
packages=find_packages(exclude=['tests', 'tests.*']),
version='0.1.4',
author='onefinestay',
author_email='engineering@onefinestay.com',
url='https://github.com/onefinestay/adyen-notification-proxy',
install_requires=requirements,
description='Proxy for devs to share Adyen notifications',
long_description=open(make_abs('README.rst')).read(),
include_package_data=True,
zip_safe=True,
)