In setup.py or pip requirements file, how to control order of installing package dependencies?
If scikits.timeseries
needs numpy
, then it should declare it as a dependency. If it did, then pip
would handle things for you (I'm pretty sure setuptools
would, too, but I haven't used it in a long while). If you control scikits.timeseries
, then you should fix it's dependency declarations.
Use setup_requires
parameter, for instance to install numpy
prior scipy
put it into setup_requires and add __builtins__.__NUMPY_SETUP__ = False
hook to get numpy installed correctly:
setup(
name='test',
version='0.1',
setup_requires=['numpy'],
install_requires=['scipy']
)
def run(self):
__builtins__.__NUMPY_SETUP__ = False
import numpy