-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation of dependencies #100
Comments
Minimal dirty fix: # install requirements before import
from setuptools import dist
SETUP_REQUIRES = ['cython>=0.26', 'numpy>=1.15']
dist.Distribution().fetch_build_eggs(SETUP_REQUIRES) , see also master...yannikschaelte:master |
Thanks @yannikschaelte for the advice. We welcome pull requests with your suggested changes. |
The only issue is that the user still has to install a compiler and ipopt as build dependencies. So we will always be left with preinstallation statements like this because all build dependencies can't be installed via pypi. |
Sure! I have added a suggestion in #101. This is basically a simple fix, needs to be verified that it works with the pypi+conda deployment. In the long-term, I would suggest to shift the build system to e.g. pyproject.toml, which may allow specifying all dependencies correctly. Agreed that non-pip dependencies will continue to need a separate installation here. The advantage for us would be that we use standard testing workflows, where we just pip-install all dependencies in a new virtual environment, and having all pip deps of ipopt ready there would simplify a few things. However, no necessity from our side, so feel free to ignore or accept the proposal, as you like. |
I'm sorta old school and the pyproject.toml file has only seemed to cause problems when I've dealt with them (for example, most conda feedstocks have to remove them for things to work: conda-forge/conda-forge.github.io#1174). We could add one but I'd be wary about shipping it with the source tarball due to the downstream complications. Moving some dependencies from |
I think it would be the only "clean" solution. However, we haven't distributed packages via conda, so possible it causes problems there. Certainly python build systems are still in flow, maybe easiest to stick to setup.py hence. |
Yeah, this is (still) one of those package types that is a bit of a pain to install only with pip. |
This is resolved (as much as it can be), so closing. There are improvements in the development install docs now too. |
As stated in the README, the tool depends on
pip install numpy cython future six setuptools
prior to installation. While these are listed under requirements in setup.py, Cython itself is used in setup.py already, making this kind of a hen-egg problem. It would be preferable (as it would simplify builds) to auto-install those dependencies by configuring the pypi package properly, could e.g. be done via setup_requires, so thatpip install ipopt
is all that is required.The text was updated successfully, but these errors were encountered: