Search code examples
pythontravis-ci

Provide alternate PyPI URL for Travis CI to install dependencies from?


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?


Solution

  • You can add custom install commands, e.g.:

    install: pip install -i http://d.pypi.python.org/simple -r requirements.txt