#7 Add bootstrap bcond for Python 3.8
Merged 5 years ago by churchyard. Opened 5 years ago by churchyard.
rpms/ churchyard/python38 bcond_bootstrap  into  master

file modified
+15 -5
@@ -36,6 +36,17 @@ 

  # WARNING: This does not change the package name and summary above

  %bcond_without flatpackage

  

+ # When bootstrapping python3, we need to build setuptools.

+ # but setuptools BR python3-devel and that brings in python3-rpm-generators;

+ # python3-rpm-generators needs python3-setuptools, so we cannot have it yet.

+ #

+ # Procedure: https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython

+ #

+ #   IMPORTANT: When bootstrapping, it's very likely the wheels for pip and

+ #   setuptools are not available. Turn off the rpmwheels bcond until

+ #   the two packages are built with wheels to get around the issue.

+ %bcond_with bootstrap

+ 

  # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package

  # Uses upstream bundled prebuilt wheels otherwise

  %bcond_without rpmwheels
@@ -77,10 +88,6 @@ 

  %endif

  

  

- # Notes from bootstraping Python 3.7:

- # https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython

- 

- 

  # =====================

  # General global macros

  # =====================
@@ -396,8 +403,8 @@ 

  BuildRequires: python-rpm-macros

  Requires: python-rpm-macros

  Requires: python3-rpm-macros

- Requires: python3-rpm-generators

  

+ %if %{without bootstrap}

  # This is not "API" (packages that need setuptools should still BuildRequire it)

  # However some packages apparently can build both with and without setuptools

  # producing egg-info as file or directory (depending on setuptools presence).
@@ -407,6 +414,9 @@ 

  # See https://fedoraproject.org/wiki/Packaging:Directory_Replacement

  Requires: python3-setuptools

  

+ Requires: python3-rpm-generators

+ %endif

+ 

  Provides: %{name}-2to3 = %{version}-%{release}

  Provides: 2to3 = %{version}-%{release}

  

no initial comment

Metadata Update from @churchyard:
- Request assigned

5 years ago

rebased onto bd473dae46754cd3eb57aa6c44cfcb1ef3ee291d

5 years ago

rebased onto 2de8d58c26a40d0124bad9529a8e7f78f40ad107

5 years ago

test_asyncio and test_hashlib failures, both unrelated.

The change itself looks good. However, I think this needs to be entangled with the rpmwheels bcond as well. Because when bootstrapping, you can't use the rpm wheels yet.

Let's put the definition of the bootstrap bcond above rpmwheels bcond, and let's set rpmwheels to negative when bootstrapping?

I was thinking about that but it depends on your bootstrapping conditions a lot.

In Fedora proper, when you rebuild setuptools/pip/wheel without wheels, you lost the packages from the repo and python3 won't install.

In Copr on the other hand, , when you rebuild setuptools/pip/wheel without wheels, you can still install the previous version of the wheels and you don't really care that they have been built with Python 3.N-1.

Maybe this just deserves a comment?

Ok, that sounds fair. I would put the 2 bconds next to each other, and comment that in most cases you should flip both.

However, are you sure that in Copr you can install the previous version? I thought it was not possible.

Pretty sure because I've forgot to flip the switch :)

You get the wheels from the Fedora repo, they are Python version agnostic and they don't any requirement on the nonwheel package that would prevent them to install.

Ah :)

Ok, how about a comment:

# When bootstrapping python3, we need to build setuptools.
# but setuptools BR python3-devel and that brings in python3-rpm-generators;
# python3-rpm-generators needs python3-setuptools, so we cannot have it yet.
# Procedure: https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython
#
#   IMPORTANT: When bootstrapping, it's very likely the wheels for pip and
#   setuptools are not available. Turn off also the `rpmwheels` bcond until
#   the two packages are built with wheels to get around the issue.

rebased onto 9b18845d8827ae449f7ed1626cc60482ab4c5cf0

5 years ago

Looks good.

I noticed one last thing, there's randomly placed comment in the spec:

# Notes from bootstraping Python 3.7:
# https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython

Let's delete it, as the link is already in your comment about the bcond?

That's just a nitpick though. Feel free to merge!

A very good nitpick. Amended.

rebased onto ad7d856

5 years ago

Pull-Request has been merged by churchyard

5 years ago

Thanks. Will ship it in late May.