Reputation: 158
I want to setup Travis CI so that it can find Python dependencies in our own PyPI server.
I know I can put the --extra-index-url option
into the requirements.txt file, but I would have rather not hardcoded the PyPI URL in the requirements file, but rather left requirements.txt generic and specify the PyPI URL just for Travis. Is this possible?
Upvotes: 4
Views: 277
Reputation: 1
The accepted answer is not complete if the extra-index-url is containing a username & password and one does not want to have their credentials in the .travis.yml.
If you happen to have a private password protected pypi running you can use environment variables set on travis to store the password and refer to it in the travis.yml
Upvotes: 0
Reputation: 24133
You can add custom install commands, e.g.:
install: pip install -i http://d.pypi.python.org/simple -r requirements.txt
Upvotes: 1