-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
49 lines (42 loc) · 1.57 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
import os
from setuptools import find_packages, setup
with open('README.md') as readme:
long_description = readme.read()
def recursive_requirements(requirement_file, libs, links, path=''):
if not requirement_file.startswith(path):
requirement_file = os.path.join(path, requirement_file)
with open(requirement_file) as requirements:
for requirement in requirements.readlines():
if requirement.startswith('-r'):
requirement_file = requirement.split()[1]
if not path:
path = requirement_file.rsplit('/', 1)[0]
recursive_requirements(requirement_file, libs, links, path=path)
elif (
requirement.startswith('-f')
or requirement.startswith('-e')
or requirement.startswith('--extra-index-url')
):
links.append(requirement.split()[1])
else:
libs.append(requirement)
libraries, dependency_links = [], []
recursive_requirements('requirements.txt', libraries, dependency_links)
setup(
name='plana',
version='1.2.3',
packages=find_packages(),
install_requires=libraries,
dependency_links=dependency_links,
long_description=long_description,
description='',
author='dnum-dip-unistra',
author_email='dnum-dip@unistra.fr',
maintainer='dnum-dip-unistra',
maintainer_email='dnum-dip@unistra.fr',
url='',
download_url='',
license='GPL-3.0-or-later',
keywords=['django', 'Université de Strasbourg'],
include_package_data=True,
)