On Sun, 12 May 2019 at 05:53, Nico Kadel-Garcia <nkadel@gmail.com> wrote:
On Sun, May 12, 2019 at 5:02 AM Phil Perry <pperry@elrepo.org> wrote:
>
> On 12/05/2019 04:45, Nico Kadel-Garcia wrote:
> > Good evening:
> If you are packaging software, you will need to decide if you wish to
> build against python2, python3 or both (that's going to be fun) and
> specify that explicitly. For example, we needed to patch the mock SPEC
> file when porting the latest version of mock from fedora to RHEL8 to
> explicitly specify python2 and/or python3.

Yeah, I took a shot at building mock before I was pointed to
https://developers.redhat.com/blog/2018/11/14/python-in-rhel-8/, which
is very useful indeed. I also went through a lot of this when I
backported awscli to RHEL 6 over at
https://github.com/nkadel/awsclirepo . I was just noticing this on
RHEL 8 as I tried to port awscli.

I'm sad to say that there are was also a confusing decision to rename
some packages such as "platform-python-coverage" instead of the old
name "python3-coverage", matching the python2-coverage which still
exists. I've no idea why someone specifically chose to violate that
naming convention, and it had to be a conscious choice.


A system may have 3 pythons on it , and each one will look in different places for libraries

platform-python is a minimal python which is meant only for allowing system packages to run. It will probably not see much updates over the life of RHEL-8. This is based of off python-3.6
python2.7 which is the 2.7 version of python and I expect will have a lifetime until RHEL-7 is end of lifed. At that point the module will probably be ended.
python3.6 which is the 3.6 module and may later be end of lifed and replaced with python-<major>.<minor> of upstreams choosing. 

 
> The good news is the errors are pretty obvious:

Yeah, I've been running into this with RHEL 6 and CentOS 6 backports
and on Fedora 30 where /usr/bin/python points to /usr/bin/python3. The
errors are usually obvious, they just take time to fix and resolve. It
*does* make me encourage the us of both "with_python2" and
"with_python3" as options, so that which modules an SRPM is building
can be explicit and help us migrate python2 packages to python3 in
parallel, and safely.

The errors are mostly obvious. There are a bunch of packages which have some /usr/bin/python embedded in it and may or may not be found during a build . [I think in most cases it will be found and error out, but I think I saw one where the python script was skipped and only showed up when I used it to build something else. 

 
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
https://lists.centos.org/mailman/listinfo/centos-devel


--
Stephen J Smoogen.