-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
54 lines (46 loc) · 1.78 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from setuptools import find_packages
import io
with io.open('README.rst', encoding="utf-8") 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'):
links.append(requirement.split()[1])
elif requirement.startswith('--allow'):
pass
else:
libs.append(requirement)
libraries, dependency_links = [], []
recursive_requirements('requirements.txt', libraries, dependency_links)
setup(
name='django-hypnos',
version='1.0.0',
packages=find_packages(),
install_requires=libraries,
dependency_links=dependency_links,
long_description=long_description,
author='morganbohn',
author_email='[email protected]',
maintainer='morganbohn',
maintainer_email='[email protected]',
description='A django webservice generator for existing databases',
license='PSF',
keywords=[
'django', 'Université de Strasbourg',
'API', 'REST', 'webservice', 'ORM'],
url='https://github.com/unistra/django-hypnos',
download_url='https://github.com/unistra/django-hypnos'
)