Child pages
  • Python Migration

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Eliminate src/externals

  1. Use available RPM packages first. For example: Use python-flask as it is available in the standard repo.
  2. For Pegasus we currently do `python clean --all install_lib -d ${dist.python-lib}`, which is equivalent to `pip install --prefix <dir> --no-deps .`
  3. For packages not available as RPM, like python-pika, we could take one of the following approaches,
    1. pip install --prefix <dir> --no-deps pika # It gets installed in the same manner as Pegasus.
    2. We could convert pika into RPM/DEB using snippet below
  4. For binary tarballs, we would just execute `pip install --prefix <dir> .` # . means lib/pegasus/python. All Python packages will be installed from PyPi.

We should no longer need src/externals, and thus not need `pegasus-config --python-externals`. For RPM and DEB packages setting PYTHONPATH would not be required at all. For binary tarballs we could ship, like HTCondor that can set PYTHONPATH with simply `pegasus-config --python`.

Code Block
titleRPM/DEB From PyPi
cd pegasus-src/lib/pegasus/python/
# Debian 9
docker run -i --rm -w /srv -v `pwd`:/srv debian:9 bash  -s <<EOT
apt-get update && apt-get -y install python-pip python-setuptools debhelper
pip install stdeb
rm -rf ./x
pip download --no-binary=:all: . -d x
cd x
tar zxvf pika-1.1.0.tar.gz
cd pika-1.1.0
python --command-packages=stdeb.command bdist_deb
# CentOS 7
docker run -i --rm -w /srv -v `pwd`:/srv centos:7 bash  -s <<EOT
yum -y install epel-release 
yum -y install python36-pip python36-setuptools rpm-build
rm -rf ./x
pip download --no-binary=:all: . -d x
cd x
tar zxvf pika-1.1.0.tar.gz
cd pika-1.1.0
python3 bdist --formats=rpm

Minimum Python Version

Pegasus Code except Worker Package