The following dependencies need to be installed before being able to run the ros_release_python
script:
sudo apt-get install dput
sudo apt-get install fakeroot
sudo apt-get install debhelper
sudo apt-get install apt-file
sudo apt-file update
sudo apt-get install python-setuptools python3-setuptools
sudo apt-get install python-all python3-all
sudo apt-get install python-pip python3-pip
python-pip
package anymore - it needs to be installed via get-pip instead.pip3 install --upgrade setuptools
stdeb
(0.9.1 or higher) via PIP:
sudo pip install [--upgrade] stdeb
sudo pip3 install [--upgrade] stdeb
twine
via PIP:
sudo pip3 install [--upgrade] twine
Note: Make sure pip
is for Python2, because sometimes when you install pip for Python3 (like on precise) it overwrites pip
as pip for Python3. You can explicitly invoke pip from Python2 like this:
$ sudo python -c "from pkg_resources import load_entry_point; load_entry_point('pip', 'console_scripts', 'pip')()" install -U stdeb
Or with Python3 like this:
$ sudo python3 -c "from pkg_resources import load_entry_point; load_entry_point('pip', 'console_scripts', 'pip')()" install -U stdeb
The Python package needs a stdeb.cfg
file beside the setup.py
file.
Invoke scripts/ros_release_python
in the root folder of the Python package to ensure that the packages can be built.
If this succeeds invoke the same command with the --upload
argument to actually push the packages to the servers.
Invoke scripts/ros_release_python --include --upload
in the root folder of the Python package.
As of stdeb 0.9.0 a Suite3
option is allowed in stdeb.cfg when building python2 and python3 packages separately as these scripts do.
You can use this feature to prevent the release of python2 packages into new distributions where we do not support python2 (e.g. Ubuntu 20.04 Focal).
As of stdeb 0.9.1 a Python2-Depends-Name
option is allowed in stdeb.cfg to override the Python 2 package name.
You can use this feature to force the Python 2 package name to be python
rather than python2
as it is on Ubuntu Focal.
This tool only uploads the generated Debian packages into the bootstrap
repository.
To make the packages available in the building / testing / main repos the Jenkins job to "import upstream" must be run.
If you have your ssh and pypi credentials available in your home directory.
docker build -t rrp .
rocker --home --user rrp
cd <PATH TO PACKAGE>
/ros_release_python/scripts/ros_release_python <ARGS>