[CentOS-devel] Python 3

Nico Kadel-Garcia nkadel at gmail.com
Thu Oct 5 06:41:49 UTC 2017

On Wed, Oct 4, 2017 at 3:34 PM, Thomas F Herbert <therbert at redhat.com> wrote:
> On 09/28/2017 10:22 PM, Nico Kadel-Garcia wrote:
> On Wed, Sep 27, 2017 at 10:54 AM, Thomas F Herbert <therbert at redhat.com>
> wrote:
> On 09/25/2017 10:05 AM, Jonathan Billings wrote:
> Python 3 is available in the SCL repos.  The /usr/bin/python in
> CentOS6 and CentOS7 are very unlikely to ever be changed from Python
> 2.x, due to how most of the management tools for RHEL/CentOS are
> written in Python 2.x.
> Johathon,
> Thanks for the suggestion. However, I am trying to build a package for
> Centos distribution and an upstream change now requires Python 3 during the
> build process. I think that SCL is in extras or EPEL isn't it?
> It's a separate repository, which CentOS rebuilds from Red Hat
> published content, much like the rest of CentOS. See
> https://wiki.centos.org/AdditionalResources/Repositories/SCL
> The command "yum install centos-release-scl" is your friend for access
> to the tools. A good look at the SRPM's over at
> http://vault.centos.org/ is invaluable for the build structure.
> Setting up "mock" to build them locally, I can ount you to some github
> repos that are helpful if you like.
> Nico, Thanks for the pointer.
> I haven't yet found a SRPM in the 7.4.1408 vault that is not part of SCL
> itself which has a dependency on software collections or python3x.
> Do you know of one?
> To emphasize, we are building nfv7 tagged vpp packages for Centos as
> follows:
> http://cbs.centos.org/koji/buildinfo?buildID=19838
> Are you recommending that we provide our package as part of scl as an
> alternative?
> So far our plan is to disable the new python3 dependent feature until
> Centos8 release so somebody downloading NFV packages wouldn't require
> anything other then Centos base packages.
> --
> Thomas F Herbert
> NFV and Fast Data Planes
> Office of Technology
> Red Hat

So, you build a local RPM and SRPM using the scl repositories and
structure. It would use the same build tools and the same
/opt/rh/python33/ or similar locations.

There are a stack of these I built up for the "airflow" python
software, for an employer, at
https://github.com/SkyhookWireless/airflowrepobuilder/. They use
"mock" to do the builds, and have configurations to set up mock
configurations for both sclo repositories and a local repository.

More information about the CentOS-devel mailing list