- Clone the repository you'll be doing developments on
- For most repositories other than
cmsgemos
, you should do the following to bring in the submodulesgit submodule init
git submodule update
- Development will, in general, not be supported on non GEM DAQ machines, so if you choose to do so, support will only be provided on a best effort basis
- For most repositories other than
- If you will be doing developments that depend on external packages, find the appropriate version to test against
- Take the appropriate
tar.gz
file for the package - Set up a
python
virtual environment somewhere:
python -m virtualenv -p <python version> --system-site-packages /path/to/your/venv
. /path/to/your/venv/bin/activate
python -m pip install -r requirements-dev.txt
# equivalent to the following
# python -m pip install -U importlib setuptools pip
# with a python2.6 virtualenv on slc6 default, uncomment the following line
# python -m pip install -I importlib 'setuptools<39.2.0' 'pip<10.1.0'
# install the necessary, external, unmodified dependencies
python -m pip install <gempython package>.tar.gz --no-deps
# set up the environment
export PATH=$VIRTUAL_ENV/lib/python*/site-packages/gempython/scripts:$PATH
export PATH=$VIRTUAL_ENV/lib/python*/site-packages/gempython/gemplotting/macros:$PATH
# create the mapping files
find <path/to/venv/lib/../site-packages/gempython> -type f -name buildMapFiles.py -exec python {} \;
You can do your development inside a virtualenv with no problem- Due to the tree structure of the
virtualenv
, trying tomake rpm
a package from inside avirtualenv
will not currently work - A solution for this will be investigated, but recommend to not try to build from inside the
virtualenv
, rather use it for testing the built package - A currently untested workaround is a new
make pip
target, which will only build thebdist/sdist
tarballs
- Due to the tree structure of the
- When you are ready to test your changes to the package you are working on
- Compile the changes and create a new package
make && make pip
- Install the new package into your virtualenv
pip install -I rpm/<package_updated>.tar.gz
also feel like this script could be tracked on github somewhere since it could be used to directly solve:
cms-gem-daq-project/gem-plotting-tools#95