Devpi
DevPI is no longer in use. See Python Dependency Management | Git dependencies instead
Installing DevPi Server
Preferred environment is Python 2.7 with pip, virtualenv installed.
Install the server
mkdir -p /opt/devpi/data cd /opt/devpi scl enable python27 bash virtualenv venv source venv/bin/activate pip install --upgrade pip pip -q -U devpi-server
The data area needs to be initialised using
cd /opt/devpi/ source venv/bin/activate devpi-server --serverdir /opt/rh/devpi/data --init
The server is run with the commands
cd /opt/devpi/ source env/bin/activate # Drop the --start to run in the forground # --stop --status --log also available devpi-server --port 3141 --serverdir /opt/rh/devpi/data --start
A proxy can be setup and it is assumed nginx will be used and the service runner needs to be set up to redirect to the devi-pi. Example configs (but not init.d) can be generated by running the
devpi-server with --gen-config
devpi is currently configured on the jira/bitbucket/confluence server using an apache proxy and is accessible at the following url https://devpi.renalregistry.nhs.uk.
devpi-server is started and stopped using scripts in /opt/devpi/bin
. These are called from an init.d
script located in /etc/init.d/devpi
.
/etc/init.d/devpi
The current set up of devpi server on the jira/Bitbucket server runs RedHat 6 and doesn't use the default httpd but uses httpd v2.4 which means it is installed via the the software collection and referenced as httpd24 with config files stored in /opt/rh/httpd24/root/etc/httpd
rather than the default path of /etc/httpd
.
Upgrading the Server
Installing DevPi Client
The version of Pip supplied with Python 3.6 no longer works with DevPi. Before following these steps upgrade it to the latest version.
Install a devpi client on your client machine
Create a pip.ini file
For your local machine:
GS: Mine is in C:\Users\MY_USERNAME\AppData\Roaming\pip
On rr-bamboo,
for 32bit Python (27 and 36 in our case), add the pip.ini file to the
C:\Windows\system32\config\systemprofile\pip
folderFor 64 bit Python (36 in our case), add the above pip.ini file to the
C:\Windows\SysWOW64\config\systemprofile\pip
folder
Configuring DevPi Server
Create a root user:
Create a user named 'ukrr' with the following:
Login and create the initial indices:
Initial seed of pips:
The lxml, pywin32 and PyQt pips were obtained from http://www.lfd.uci.edu/~gohlke/pythonlibs/
The pysvn pip has to be built using https://github.com/ferraith/pysvn-wheeler Instructions are contained in the download.I noticed when I uploaded pyinstaller 3.3 (for tpckd_validation, python 3.5), devpi refused to search the main indices for other versions of same modules. Setting up a mirror allowed access to the tip version, so if you want a previous version, this needs to be uploaded by hand. Fetch the source from pypi, and build the wheel using python setup.py bdist_wheel (remember to use the right version of python for the target wheel).
Related articles