-
Notifications
You must be signed in to change notification settings - Fork 22
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
Pass (additional) index url to pip install command #398
Comments
The osdep system nowadays supports passing per-package arguments. The bundler manager for instance accepts 'version' to specify a package version. I think you could handle the index URL this way. You would indeed have to have more than one pip call, which would have to be handled by the python package manager. I am lucky and never had to dig into python package managers. Isn't there something standard closer to bundler, where you could list all the dependency requirements (including index URLs) and have them installed at once by the tool ? |
Did you look into setting up a workspace specific pip configuration, e.g. via pip config or via PIP_CONFIG_FILE env variable. There you can set the extra-index-url without changing autoproj, although this will not be package specific. Regarding the installation of python_package:
You can already use "pip install -r requirements.txt", where requirements.txt is a collection of the commandline arguments including the list of packages - if that is what you are looking for. Maybe in combination with exporting a fixed dependency list via 'pip freeze'. |
Thanks for the hint - I didn't know that option existed! For a global I've seen a related discussion here, regarding passing certain options on a per-package basis (here: |
The PipManager currently installs all pip osdeps in one big install command. It can only install from the default package index, and allows besides the version range spec that can be passed with the package name no further options.
Pip provides a lot of options. I am especially interested in
--index-url
and--extra-index-url
. These would allow us to install packages from non-standard package indexes, e.g., CPU-only builds of torch from this index. It would also allow us to host our own internal package index, and install pip packages as osdeps from there.To facilitate this, the osdeps syntax of pip packages would need to be extended, and the pip install command might need to be split up appropriately, to not leak the additional arguments to the installation of other packages.
An alternative to some of these use cases might be to define autobuild packages for these packages. But autobuild packages are currently not installed with pip, but with
python setup.py install
(related issue: rock-core/autobuild#108), which might not work with some workspaces or packages. Also we would need to duplicate the dependencies of those packages in our package set then.Any comments / suggestions?
The text was updated successfully, but these errors were encountered: