I never tried using my own index, but after some research this article should cover what you want to do.
Basically you need to add the following to your ~/.pip/pip.conf
(on Windows systems, located at %HOME%\pip\pip.ini
):
[global]
index-url = http://my.pypi.index/comes/here
The problem is that you will have a global definition for all your projects and what you want is a definition for all your users in the specific project. From pip documentation you can alter the config file lookup by using the environment var PIP_CONFIG_FILE
You could edit the virtual-env-folder/bin/activate
script to include this environment var, but the problem is that creating a new virtual environment would lose this change and would not be possible to automate. What you can do is creating the .pip/pip.conf
file in the root of your project and creating a simple activate-virtual-env
script also on the root of the project with the following:
pushd $(dirname $0)
export PIP_CONFIG_FILE="$(pwd)/.pip/pip.conf"
source "$(pwd)/virtual-env-folder/bin/activate"
popd
and instruct your users to source this file instead of virtual-env-folder/bin/activate