Commit b54e73aa authored by Eric Coissac's avatar Eric Coissac

Try for resolving dependencies install

parent 615d6d09
......@@ -7,4 +7,5 @@ recursive-include doc/sphinx/source *.txt *.rst *.py
include doc/sphinx/make.bat
include doc/sphinx/Makefile
include README.txt
include requirements.txt
......@@ -8,6 +8,14 @@ from os import path
import os.path
import glob
try:
from setuptools import setup as ori_setup
has_setuptools = True
except ImportError:
from distutils.core import setup as ori_setup
has_setuptools = False
from distutils.core import setup as ori_setup
from distutils.extension import Extension
......@@ -119,6 +127,18 @@ CEXES =[]
FILES =[]
def setup(**attrs):
if has_setuptools:
try:
requirements = open('requirements.txt').readlines()
requirements = [x.strip() for x in requirements]
if 'install_requires' not in attrs:
attrs['install_requires']=requirements
else:
attrs['install_requires'].extend(requirements)
except IOError:
pass
if 'distclass' not in attrs:
attrs['distclass']=Distribution
......@@ -141,13 +161,6 @@ def setup(**attrs):
if 'cmdclass' not in attrs:
attrs['cmdclass'] = COMMANDS
if 'requires' not in attrs:
attrs['requires'] = []
attrs['requires'].append('Cython (>=0.21)')
attrs['requires'].append('Sphinx (>=1.2.0)')
attrs['requires'].append('wheel (>=0.24.0)')
attrs['requires'].append('virtualenv (>=1.11.0)')
if 'ctools' not in attrs:
attrs['ctools'] = CTOOLS
......
-i https://pypi.python.org/simple/
Cython>=0.21
Sphinx>=1.2.0
wheel>=0.24.0
virtualenv>=1.11.0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment