#25 Reenable test_distutils and test_bdist_rpm
Merged 3 months ago by churchyard. Opened 3 months ago by churchyard.
rpms/ churchyard/python38 reenable_test_distutils  into  master

file modified
+8 -4

@@ -204,8 +204,8 @@ 

  %endif

  

  %if %{without bootstrap}

- # for make regen-all

- BuildRequires: python3

+ # for make regen-all and distutils.tests.test_bdist_rpm

+ BuildRequires: python%{pyshortver}

  %endif

  

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

@@ -625,7 +625,7 @@ 

  

  %if %{without bootstrap}

    # Regenerate generated files (needs python3)

-   %make_build regen-all PYTHON_FOR_REGEN="python3"

+   %make_build regen-all PYTHON_FOR_REGEN="python%{pybasever}"

  %endif

  

  

@@ -952,10 +952,14 @@ 

    #   https://bugzilla.redhat.com/show_bug.cgi?id=1678277

    # test_asyncio skipped:

    #   https://bugs.python.org/issue35998

+   # test_distutils

+   #   distutils.tests.test_bdist_rpm tests fail when bootstraping the Python

+   #   package: rpmbuild requires /usr/bin/pythonX.Y to be installed

    LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \

      -wW --slowest -j0 \

+     %if %{with bootstrap}

      -x test_distutils \

-     -x test_bdist_rpm \

+     %endif

      %ifarch %{arm} s390x

      -x test_gdb \

      %endif

A bootstrap build:

$ git diff
diff --git a/python38.spec b/python38.spec
index 3f40c79..bf45552 100644
--- a/python38.spec
+++ b/python38.spec
@@ -45,7 +45,7 @@ License: Python
 #   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
+%bcond_without bootstrap

 # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
 # Uses upstream bundled prebuilt wheels otherwise

$ fedpkg --release master build --nowait --scratch --srpm
Building python38-3.8.0~b1-1.fc31.src.rpm for rawhide
Created task: 35836397
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=35836397

A bootstrap nonflat build:

$ git diff
diff --git a/python38.spec b/python38.spec
index 3f40c79..7d242a5 100644
--- a/python38.spec
+++ b/python38.spec
@@ -34,7 +34,7 @@ License: Python
 # in Fedora, never turn this on for the python3 package
 # and always keep it on for python37 etc.
 # WARNING: This does not change the package name and summary above
-%bcond_without flatpackage
+%bcond_with flatpackage

 # When bootstrapping python3, we need to build setuptools.
 # but setuptools BR python3-devel and that brings in python3-rpm-generators;
@@ -45,7 +45,7 @@ License: Python
 #   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
+%bcond_without bootstrap

 # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
 # Uses upstream bundled prebuilt wheels otherwise

$ fedpkg --release master build --nowait --scratch --srpm
Building python38-3.8.0~b1-1.fc31.src.rpm for rawhide
Created task: 35836624
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=35836624

A nonflat nonboostrap build:

$ git diff
diff --git a/python38.spec b/python38.spec
index 3f40c79..7f2ad51 100644
--- a/python38.spec
+++ b/python38.spec
@@ -34,7 +34,7 @@ License: Python
 # in Fedora, never turn this on for the python3 package
 # and always keep it on for python37 etc.
 # WARNING: This does not change the package name and summary above
-%bcond_without flatpackage
+%bcond_with flatpackage

 # When bootstrapping python3, we need to build setuptools.
 # but setuptools BR python3-devel and that brings in python3-rpm-generators;

$ fedpkg --release master build --nowait --scratch --srpm
Building python38-3.8.0~b1-1.fc31.src.rpm for rawhide
Created task: 35836631
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=35836631

Pull-Request has been merged by churchyard

3 months ago

Thanks! It's nice to see one less test to be skipped ;-)