Adding new modules to the Pypi-repo¶
If you have pip2pi installed, you can simply do the following to add any modules from pypi or tarballs:
-
pip2pi $PATH_TO_PYPI_REPO <pypi_module_name==version>;$PATH_TO_PYPI_REPO/<new_module_name>.whlwill be added after this;- This is the recommended way to install any packages from pypi.org as
pip2piwill handle the dependencies automatically;
-
For tarballs, you can simply copy them over to the
pypi-repodirectory (NOTE: this is to be used only on our self-brewed packages);- Remember to rename the tarball to
module-name_X.X.X.tar.gzbefore the next step;
- Remember to rename the tarball to
-
Run
dir2pi $PATH_TO_PYPI_REPOto generate new index files:$PATH_TO_PYPI_REPO/simple/index.htmlwill have a new entry for the newly-added module;- A new subdirectory will be created as
$PATH_TO_PYPI_REPO/simple/<new module name>which contains:- An
index.html - symbolic links to the wheel or tarball files under
$PATH_TO_PYPI_REPOfor each version of this module.
- An
Installing pip2pi¶
If you do not have pip2pi available, you can do the following to install it. Note that the latest official version (more than 2 years old) of pip2pi does not work well with python3. We have a patched version available here.
-
setup python3, skip this step if you already have access to it:
source /cvmfs/dune.opensciencegrid.org/dunedaq/DUNE/products/setup; setup python v3_8_3b;
-
create and activate a virtual environment:
python -m venv pypi-repo-venvsource pypi-repo-venv/bin/activate
-
install
pip2py:pip install https://github.com/dingp/pip2pi/archive/1.0.0.tar.gz
Now you should have access to pip2pi and dir2pi commands. Next time, you can simply activate the virtual env for accessing these tools.
Preapre the repo in staging area on docker-bd¶
-
The staging area including that for
pypi-repois under/home/dingpf/cvmfs_dunedaq; -
Run
docker run --rm -it -v /home/dingpf/cvmfs_dunedaq:/cvmfs/dunedaq.opensciencegrid.org -v $PWD:/scratch dunedaq/sl7to start a container; -
Follow the instructions above to install
pip2pi; -
Follow the instruction above to add new packages to the repo.
Publishing to cvmfs repo¶
-
Login as
cvmfsdunedaqtooasiscfs01.fnal.gov; -
Obtain a valid FNAL Kerberos ticket;
-
run
~/bin/dunedaq-sync pypi-repoto publish the staging area ondocker-bd.fnal.gov.
Last git commit to the markdown source of this page:
Author: Pengfei Ding
Date: Thu Aug 12 11:30:51 2021 -0500
If you see a problem with the documentation on this page, please file an Issue at https://github.com/DUNE-DAQ/daq-release/issues