#9 Use importlib_metadata rather than pip freeze
Merged 23 days ago by pviktori. Opened 2 months ago by pviktori.
rpms/ pviktori/pyproject-rpm-macros importlib_metadata  into  master

file modified
+1 -2

@@ -5,7 +5,7 @@ 

  

  

  %pyproject_install() %{expand:\\\

- %{__python3} -m pip install   --root %{buildroot}  --strip-file-prefix %{buildroot} --no-deps  --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location ./*.whl

+ %{__python3} -m pip install --root %{buildroot} --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location ./*.whl

  if [ -d %{buildroot}%{_bindir} ]; then

    pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*

  fi

@@ -24,7 +24,6 @@ 

  %{-e:%{expand:%global toxenv %{-e*}}}

  echo 'python3-devel'

  echo 'python3dist(packaging)'

- echo 'python3dist(pip) >= 19'

  echo 'python3dist(pytoml)'

  # setuptools assumes no pre-existing dist-info

  rm -rfv *.dist-info/

file modified
+15 -4

@@ -21,17 +21,28 @@ 

  

  BuildArch:      noarch

  

- # We keep them here for now to avoid one loop of %%generate_buildrequires

- # And to allow the other macros without %%pyproject_buildrequires (e.g. on Fedora 30)

- # But those are also always in the output of %%generate_buildrequires

- # in order to be removable in the future

  Requires: python3-pip >= 19

  Requires: python3-devel

  

+ # We keep these here for now to avoid one loop of %%generate_buildrequires

+ # But those are also always in the output of %%generate_buildrequires

+ # in order to be removable in the future

+ Requires: python3dist(packaging)

+ Requires: python3dist(pytoml)

+ 

+ # This is not output from %%generate_buildrequires to work around:

+ #   https://github.com/rpm-software-management/mock/issues/336

+ Requires: (python3dist(importlib-metadata) if python3 < 3.8)

+ 

  %if %{with tests}

  BuildRequires: python3dist(pytest)

  BuildRequires: python3dist(pyyaml)

  BuildRequires: python3dist(packaging)

+ %if 0%{fedora} < 32

+ # The %%if should not be needed, it works around:

+ #   https://github.com/rpm-software-management/mock/issues/336

+ BuildRequires: (python3dist(importlib-metadata) if python3 < 3.8)

+ %endif

  BuildRequires: python3dist(pytoml)

  BuildRequires: python3dist(pip)

  BuildRequires: python3dist(setuptools)

file modified
+18 -20

@@ -26,7 +26,10 @@ 

      from packaging.requirements import Requirement, InvalidRequirement

      from packaging.version import Version

      from packaging.utils import canonicalize_name, canonicalize_version

-     import pip

+     try:

+         import importlib.metadata as importlib_metadata

+     except ImportError:

+         import importlib_metadata

  except ImportError as e:

      print_err('Import error:', e)

      # already echoed by the %pyproject_buildrequires macro

@@ -44,14 +47,8 @@ 

  

  class Requirements:

      """Requirement printer"""

-     def __init__(self, freeze_output, extras=''):

-         self.installed_packages = {}

-         for line in freeze_output.splitlines():

-             line = line.strip()

-             if line.startswith('#'):

-                 continue

-             name, version = line.split('==')

-             self.installed_packages[name.strip()] = Version(version)

+     def __init__(self, get_installed_version, extras=''):

+         self.get_installed_version = get_installed_version

  

          self.marker_env = {'extra': extras}

  

@@ -77,7 +74,11 @@ 

              print_err(f'Ignoring alien requirement:', requirement_str)

              return

  

-         installed = self.installed_packages.get(requirement.name)

+         try:

+             installed = self.get_installed_version(requirement.name)

+         except importlib_metadata.PackageNotFoundError:

+             print_err(f'Requirement not satisfied: {requirement_str}')

+             installed = None

          if installed and installed in requirement.specifier:

              print_err(f'Requirement satisfied: {requirement_str}')

              print_err(f'   (installed: {requirement.name} {installed})')

@@ -203,9 +204,14 @@ 

  

  

  def generate_requires(

-     freeze_output, *, include_runtime=False, toxenv=None, extras='',

+     *, include_runtime=False, toxenv=None, extras='',

+     get_installed_version=importlib_metadata.version,  # for dep injection

  ):

-     requirements = Requirements(freeze_output, extras=extras)

+     """Generate the BuildRequires for the project in the current directory

+ 

+     This is the main Python entry point.

+     """

+     requirements = Requirements(get_installed_version, extras=extras)

  

      try:

          backend = get_backend(requirements)

@@ -259,16 +265,8 @@ 

          print_err('-x (--extras) are only useful with -r (--runtime)')

          exit(1)

  

-     freeze_output = subprocess.run(

-         [sys.executable, '-I', '-m', 'pip', 'freeze', '--all'],

-         encoding='utf-8',

-         stdout=subprocess.PIPE,

-         check=True,

-     ).stdout

- 

      try:

          generate_requires(

-             freeze_output,

              include_runtime=args.runtime,

              toxenv=args.toxenv,

              extras=args.extras,

@@ -6,6 +6,11 @@ 

  

  from pyproject_buildrequires import generate_requires

  

+ try:

+     import importlib.metadata as importlib_metadata

+ except ImportError:

+     import importlib_metadata

+ 

  testcases = {}

  with Path(__file__).parent.joinpath('testcases.yaml').open() as f:

      testcases = yaml.safe_load(f)

@@ -26,9 +31,17 @@ 

          if filename in case:

              cwd.joinpath(filename).write_text(case[filename])

  

+     def get_installed_version(dist_name):

+         try:

+             return str(case['installed'][dist_name])

+         except (KeyError, TypeError):

+             raise importlib_metadata.PackageNotFoundError(

+                 f'info not found for {dist_name}'

+             )

+ 

      try:

          generate_requires(

-             case['freeze_output'],

+             get_installed_version=get_installed_version,

              include_runtime=case.get('include_runtime', False),

              extras=case.get('extras', ''),

              toxenv=case.get('toxenv', None),

file modified
+43 -44

@@ -1,5 +1,5 @@ 

  No pyproject.toml, nothing installed:

-   freeze_output: |

+   installed:

      # empty

    expected: |

      python3dist(setuptools) >= 40.8

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

    result: 0

  

  Nothing installed yet:

-   freeze_output: |

+   installed:

      # empty

    pyproject.toml: |

      # empty

@@ -17,9 +17,9 @@ 

    result: 0

  

  Insufficient version of setuptools:

-   freeze_output: |

-     setuptools==5

-     wheel==1

+   installed:

+     setuptools: 5

+     wheel: 1

    pyproject.toml: |

      # empty

    expected: |

@@ -28,9 +28,9 @@ 

    result: 0

  

  Empty pyproject.toml, empty setup.py:

-   freeze_output: |

-     setuptools==50

-     wheel==1

+   installed:

+     setuptools: 50

+     wheel: 1

    setup.py: |

    expected: |

      python3dist(setuptools) >= 40.8

@@ -39,9 +39,9 @@ 

    result: 0

  

  Default build system, empty setup.py:

-   freeze_output: |

-     setuptools==50

-     wheel==1

+   installed:

+     setuptools: 50

+     wheel: 1

    pyproject.toml: |

      # empty

    setup.py: |

@@ -52,24 +52,24 @@ 

    result: 0

  

  Erroring setup.py:

-   freeze_output: |

-     setuptools==50

-     wheel==1

+   installed:

+     setuptools: 50

+     wheel: 1

    setup.py: |

      exit(77)

    result: 77

  

  Bad character in version:

-   freeze_output: |

+   installed: {}

    pyproject.toml: |

      [build-system]

      requires = ["pkg == 0.$.^.*"]

    except: ValueError

  

  Build system dependencies in pyproject.toml:

-   freeze_output: |

-     setuptools==50

-     wheel==1

+   installed:

+     setuptools: 50

+     wheel: 1

    pyproject.toml: |

      [build-system]

      requires = [

@@ -100,9 +100,9 @@ 

    result: 0

  

  Default build system, build dependencies in setup.py:

-   freeze_output: |

-     setuptools==50

-     wheel==1

+   installed:

+     setuptools: 50

+     wheel: 1

    setup.py: |

      from setuptools import setup

      setup(

@@ -120,10 +120,10 @@ 

    result: 0

  

  Default build system, run dependencies in setup.py:

-   freeze_output: |

-     setuptools==50

-     wheel==1

-     pyyaml==1

+   installed:

+     setuptools: 50

+     wheel: 1

+     pyyaml: 1

    include_runtime: true

    setup.py: |

      from setuptools import setup

@@ -143,10 +143,10 @@ 

    result: 0

  

  Run dependencies with extras (not selected):

-   freeze_output: |

-     setuptools==50

-     wheel==1

-     pyyaml==1

+   installed:

+     setuptools: 50

+     wheel: 1

+     pyyaml: 1

    include_runtime: true

    setup.py: &pytest_setup_py |

          # slightly abriged copy of pytest's setup.py

@@ -200,10 +200,10 @@ 

    result: 0

  

  Run dependencies with extras (selected):

-   freeze_output: |

-     setuptools==50

-     wheel==1

-     pyyaml==1

+   installed:

+     setuptools: 50

+     wheel: 1

+     pyyaml: 1

    include_runtime: true

    extras: testing

    setup.py: *pytest_setup_py

@@ -227,10 +227,10 @@ 

  

  Run dependencies with multiple extras:

    xfail: requirement.marker.evaluate seems to not support multiple extras

-   freeze_output: |

-     setuptools==50

-     wheel==1

-     pyyaml==1

+   installed:

+     setuptools: 50

+     wheel: 1

+     pyyaml: 1

    include_runtime: true

    extras: testing,more-testing, even-more-testing , cool-feature

    setup.py: |

@@ -246,19 +246,18 @@ 

    expected: |

      python3dist(setuptools) >= 40.8

      python3dist(wheel)

-     python3dist(wheel)

      python3dist(dep1)

      python3dist(dep2)

      python3dist(dep3)

      python3dist(dep4)

    result: 0

  

- Tox depndencies:

-   freeze_output: |

-     setuptools==50

-     wheel==1

-     tox==3.5.3

-     tox-current-env==0.0.2

+ Tox dependencies:

+   installed:

+     setuptools: 50

+     wheel: 1

+     tox: 3.5.3

+     tox-current-env: 0.0.2

    toxenv: py3

    setup.py: |

      from setuptools import setup

file modified
+5 -2

@@ -23,14 +23,17 @@ 

  rpmbuild -bs ${1}.spec

  

  # build the SRPM in mock

+ res=0

  mock -r $config --enablerepo=local init

- mock -r $config --enablerepo=local ~/rpmbuild/SRPMS/${1}-*.src.rpm

+ mock -r $config --enablerepo=local ~/rpmbuild/SRPMS/${1}-*.src.rpm || res=$?

  

  # move the results to the artifacts directory, so we can examine them

  artifacts=${TEST_ARTIFACTS:-/tmp/artifacts}

  pushd /var/lib/mock/fedora-rawhide-x86_64/result

- mv *.rpm ${artifacts}/

+ mv *.rpm ${artifacts}/ || :

  for log in *.log; do

   mv ${log} ${artifacts}/${1}-${log}

  done

  popd

+ 

+ exit $res

Apparently, pip freeze fails on the latest version of python3-gpgme we have in Rawhide, where it outputs:

gpg===1.13.1-unknown

(note the three =s)

Switch to importlib_metadata.version.

The Ci failure is weird. We really need to upload the logs even if the build fails.

pip is still needed:

$ mock -r fedora-rawhide-x86_64 --no-clean --no-cleanup-after --enablerepo=local ~/rpmbuild/SRPMS/python-entrypoints-0.3-0.fc30.src.rpm 
INFO: mock.py version 1.4.17 starting (python version = 3.7.4)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
INFO: Start(/home/churchyard/rpmbuild/SRPMS/python-entrypoints-0.3-0.fc30.src.rpm)  Config(fedora-rawhide-x86_64)
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.17
INFO: Mock Version: 1.4.17
Finish: chroot init
Start: build phase for python-entrypoints-0.3-0.fc30.src.rpm
Start: build setup for python-entrypoints-0.3-0.fc30.src.rpm
Building target platforms: x86_64
Building for target x86_64
Wrote: /builddir/build/SRPMS/python-entrypoints-0.3-0.fc31.src.rpm
Failed loading plugin "py3query": No module named 'taskotron_python_versions'
fedora                                                                            25 kB/s |  19 kB     00:00    
local                                                                            6.9 kB/s | 3.8 kB     00:00    
Package pyproject-rpm-macros-0-4.fc31.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Finish: build setup for python-entrypoints-0.3-0.fc30.src.rpm
Start: rpmbuild python-entrypoints-0.3-0.fc30.src.rpm
Start: Outputting list of installed packages
Finish: Outputting list of installed packages
Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.48ICow
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf entrypoints-0.3
+ /usr/bin/gzip -dc /builddir/build/SOURCES/entrypoints-0.3.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd entrypoints-0.3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.YtlJBu
+ umask 022
+ cd /builddir/build/BUILD
+ cd entrypoints-0.3
+ echo python3-devel
+ echo 'python3dist(packaging)'
+ echo '(python3dist(importlib-metadata) if python3 < 3.8)'
+ echo 'python3dist(pytoml)'
+ rm -rfv '*.dist-info/'
+ '[' -f /usr/bin/python3 ']'
+ /usr/bin/python3 -I /usr/lib/rpm/redhat/pyproject_buildrequires.py
Handling flit from build-system.requires
Requirement not satisfied: flit
Exiting dependency generation pass: build backend
+ RPM_EC=0
++ jobs -p
+ exit 0
python3-devel
python3dist(packaging)
(python3dist(importlib-metadata) if python3 < 3.8)
python3dist(pytoml)
python3dist(flit)
Wrote: /builddir/build/SRPMS/python-entrypoints-0.3-0.fc31.buildreqs.nosrc.rpm
INFO: Dynamic buildrequires detected
INFO: Going to install missing buildrequires
Failed loading plugin "py3query": No module named 'taskotron_python_versions'
fedora                                                                            25 kB/s |  19 kB     00:00    
local                                                                            6.5 kB/s | 3.8 kB     00:00    
Package python3-importlib-metadata-0.18-2.fc31.noarch is already installed.
Package pyproject-rpm-macros-0-4.fc31.noarch is already installed.
Package python3-devel-3.7.4-4.fc31.x86_64 is already installed.
Package python3-packaging-19.0-2.fc31.noarch is already installed.
Package python3-pytoml-0.1.18-4.fc31.noarch is already installed.
Dependencies resolved.
=================================================================================================================
 Package                         Architecture          Version                       Repository             Size
=================================================================================================================
Installing:
 python3-flit                    noarch                1.3-2.fc31                    fedora                101 k
Installing dependencies:
 python3-chardet                 noarch                3.0.4-10.fc31                 fedora                194 k
 python3-docutils                noarch                0.15.2-1.fc31                 fedora                1.5 M
 python3-idna                    noarch                2.8-2.fc31                    fedora                 96 k
 python3-pysocks                 noarch                1.7.0-2.fc31                  fedora                 34 k
 python3-requests                noarch                2.22.0-3.fc31                 fedora                111 k
 python3-urllib3                 noarch                1.25.3-4.fc31                 fedora                203 k

Transaction Summary
=================================================================================================================
Install  7 Packages

Total size: 2.2 M
Installed size: 8.7 M
Downloading Packages:
[SKIPPED] python3-chardet-3.0.4-10.fc31.noarch.rpm: Already downloaded                                          
[SKIPPED] python3-docutils-0.15.2-1.fc31.noarch.rpm: Already downloaded                                         
[SKIPPED] python3-flit-1.3-2.fc31.noarch.rpm: Already downloaded                                                
[SKIPPED] python3-idna-2.8-2.fc31.noarch.rpm: Already downloaded                                                
[SKIPPED] python3-pysocks-1.7.0-2.fc31.noarch.rpm: Already downloaded                                           
[SKIPPED] python3-requests-2.22.0-3.fc31.noarch.rpm: Already downloaded                                         
[SKIPPED] python3-urllib3-1.25.3-4.fc31.noarch.rpm: Already downloaded                                          
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                         1/1 
  Installing       : python3-idna-2.8-2.fc31.noarch                                                          1/7 
  Installing       : python3-pysocks-1.7.0-2.fc31.noarch                                                     2/7 
  Installing       : python3-urllib3-1.25.3-4.fc31.noarch                                                    3/7 
  Installing       : python3-docutils-0.15.2-1.fc31.noarch                                                   4/7 
  Installing       : python3-chardet-3.0.4-10.fc31.noarch                                                    5/7 
  Installing       : python3-requests-2.22.0-3.fc31.noarch                                                   6/7 
  Installing       : python3-flit-1.3-2.fc31.noarch                                                          7/7 
  Running scriptlet: python3-flit-1.3-2.fc31.noarch                                                          7/7 
error: failed to exec scriptlet interpreter /bin/sh: Permission denied
warning: %triggerin(glibc-common-2.30-1.fc31.x86_64) scriptlet failed, exit status 127

Error in <unknown> scriptlet in rpm package python3-flit
  Verifying        : python3-chardet-3.0.4-10.fc31.noarch                                                    1/7 
  Verifying        : python3-docutils-0.15.2-1.fc31.noarch                                                   2/7 
  Verifying        : python3-flit-1.3-2.fc31.noarch                                                          3/7 
  Verifying        : python3-idna-2.8-2.fc31.noarch                                                          4/7 
  Verifying        : python3-pysocks-1.7.0-2.fc31.noarch                                                     5/7 
  Verifying        : python3-requests-2.22.0-3.fc31.noarch                                                   6/7 
  Verifying        : python3-urllib3-1.25.3-4.fc31.noarch                                                    7/7 

Installed:
  python3-flit-1.3-2.fc31.noarch                          python3-chardet-3.0.4-10.fc31.noarch                   
  python3-docutils-0.15.2-1.fc31.noarch                   python3-idna-2.8-2.fc31.noarch                         
  python3-pysocks-1.7.0-2.fc31.noarch                     python3-requests-2.22.0-3.fc31.noarch                  
  python3-urllib3-1.25.3-4.fc31.noarch                   

Complete!
Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.xG14ot
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf entrypoints-0.3
+ /usr/bin/gzip -dc /builddir/build/SOURCES/entrypoints-0.3.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd entrypoints-0.3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.1Fe30v
+ umask 022
+ cd /builddir/build/BUILD
+ cd entrypoints-0.3
+ echo python3-devel
+ echo 'python3dist(packaging)'
+ echo '(python3dist(importlib-metadata) if python3 < 3.8)'
+ echo 'python3dist(pytoml)'
+ rm -rfv '*.dist-info/'
+ '[' -f /usr/bin/python3 ']'
+ /usr/bin/python3 -I /usr/lib/rpm/redhat/pyproject_buildrequires.py
Handling flit from build-system.requires
Requirement satisfied: flit
   (installed: flit 1.3)
Couldn't get list of valid classifiers to check against
Handling configparser (>=3.5); python_version == '2.7' from get_requires_for_build_wheel
Ignoring alien requirement: configparser (>=3.5); python_version == '2.7'
+ RPM_EC=0
++ jobs -p
+ exit 0
python3-devel
python3dist(packaging)
(python3dist(importlib-metadata) if python3 < 3.8)
python3dist(pytoml)
python3dist(flit)
Wrote: /builddir/build/SRPMS/python-entrypoints-0.3-0.fc31.buildreqs.nosrc.rpm
INFO: Dynamic buildrequires detected
INFO: Going to install missing buildrequires
Failed loading plugin "py3query": No module named 'taskotron_python_versions'
fedora                                                                            33 kB/s |  19 kB     00:00    
local                                                                            6.5 kB/s | 3.8 kB     00:00    
Package python3-importlib-metadata-0.18-2.fc31.noarch is already installed.
Package pyproject-rpm-macros-0-4.fc31.noarch is already installed.
Package python3-devel-3.7.4-4.fc31.x86_64 is already installed.
Package python3-flit-1.3-2.fc31.noarch is already installed.
Package python3-packaging-19.0-2.fc31.noarch is already installed.
Package python3-pytoml-0.1.18-4.fc31.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Building target platforms: x86_64
Building for target x86_64
Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.Lz8Nzx
+ umask 022
+ cd /builddir/build/BUILD
+ cd entrypoints-0.3
+ echo python3-devel
+ echo 'python3dist(packaging)'
+ echo '(python3dist(importlib-metadata) if python3 < 3.8)'
+ echo 'python3dist(pytoml)'
+ rm -rfv '*.dist-info/'
+ '[' -f /usr/bin/python3 ']'
+ /usr/bin/python3 -I /usr/lib/rpm/redhat/pyproject_buildrequires.py
Handling flit from build-system.requires
Requirement satisfied: flit
   (installed: flit 1.3)
Couldn't get list of valid classifiers to check against
Handling configparser (>=3.5); python_version == '2.7' from get_requires_for_build_wheel
Ignoring alien requirement: configparser (>=3.5); python_version == '2.7'
+ RPM_EC=0
++ jobs -p
+ exit 0
python3-devel
python3dist(packaging)
(python3dist(importlib-metadata) if python3 < 3.8)
python3dist(pytoml)
python3dist(flit)
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.rQbsdw
+ umask 022
+ cd /builddir/build/BUILD
+ cd entrypoints-0.3
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ /usr/bin/python3 -m pip wheel --no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --progress-bar off --verbose .
/usr/bin/python3: No module named pip


RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.rQbsdw (%build)
    Bad exit status from /var/tmp/rpm-tmp.rQbsdw (%build)
ERROR: Exception(/home/churchyard/rpmbuild/SRPMS/python-entrypoints-0.3-0.fc30.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 18 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
ERROR: state finish mismatch: current: rpmbuild python-entrypoints-0.3-0.fc30.src.rpm, state: build phase for python-entrypoints-0.3-0.fc30.src.rpm

always require this for %pyproject_build.

Those are only needed for %pyproject_buildrequires and hence don't need to be here.

This Require gets deleted because every python has pip and we require python3-devel?

it should not be deleted. "every python has pip" is not true.

@pviktori Could you please rebase this and fix the requires?

rebased onto d72a646

a month ago

Rebased. Sorry for the delay.

rebased onto d262d90

a month ago

works fine locally, but the CI tests have failed :(

[citest]

1 new commit added

  • Fedora CI: Publish the mock logs even when it fails
a month ago

I've pushed a commit that should hopefully allow us to examine the failure.

2 new commits added

  • Fedora CI: Publish the mock logs even when it fails
  • Use importlib_metadata rather than pip freeze
a month ago

Finally, the CI gave the output. It is:

+ /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/python-clikit-0.3.1-1.fc32.x86_64 --strip-file-prefix /builddir/build/BUILDROOT/python-clikit-0.3.1-1.fc32.x86_64 --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location ./clikit-0.3.1-py2.py3-none-any.whl

Usage:   
  /usr/bin/python3 -m pip install [options] <requirement specifier> [package-index-options] ...
  /usr/bin/python3 -m pip install [options] -r <requirements file> [package-index-options] ...
  /usr/bin/python3 -m pip install [options] [-e] <vcs project url> ...
  /usr/bin/python3 -m pip install [options] [-e] <local project path> ...
  /usr/bin/python3 -m pip install [options] <archive url/path> ...

no such option: --strip-file-prefix

Indeed, this needs to be removed here as well. To make things easier, I'll push the change to this PR, although it is not relevant.

1 new commit added

  • Don't use --strip-file-prefix with pip, the custom option is gone
23 days ago

It builds \o/

@pviktori Please sanity check my commits. Merge and build if you are available or just ack and I'll do it.

Pull-Request has been merged by pviktori

23 days ago