#3 Use %pyproject_buildrequires to bring in all the needed tools (like pip)
Merged 3 years ago by churchyard. Opened 3 years ago by churchyard.
rpms/ churchyard/python-pep517 pyproject_update  into  master

file modified
+12
@@ -22,3 +22,15 @@ 

   ]

   classifiers = ["License :: OSI Approved :: MIT License"]

   

+ diff --git a/dev-requirements.txt b/dev-requirements.txt

+ index 4e62f58..ecbaa9b 100644

+ --- a/dev-requirements.txt

+ +++ b/dev-requirements.txt

+ @@ -4,5 +4,5 @@ mock

+  testpath

+  toml

+  setuptools>=30

+ -importlib_metadata

+ -zipp

+ +importlib_metadata ; python_version<'3.8'

+ +zipp ; python_version<'3.8'

file modified
+13 -17
@@ -2,7 +2,7 @@ 

  

  Name:           python-%{pypi_name}

  Version:        0.7.0

- Release:        5%{?dist}

+ Release:        6%{?dist}

  Summary:        Wrappers to build Python packages using PEP 517 hooks

  

  %bcond_without tests
@@ -17,17 +17,8 @@ 

  # Submitted upstream: https://github.com/pypa/pep517/pull/70

  Patch0:         no-backports.patch

  

- # Don't use %%pyproject_buildrequires to avoid a build dependency loop.

  BuildRequires:  python3-devel

  BuildRequires:  pyproject-rpm-macros

- BuildRequires:  python3dist(flit)

- 

- %if %{with tests}

- BuildRequires:  python3dist(pytest)

- BuildRequires:  python3dist(toml)

- BuildRequires:  python3dist(mock)

- BuildRequires:  python3dist(testpath)

- %endif

  

  

  %description
@@ -39,8 +30,6 @@ 

  Summary:        %{summary}

  %{?python_provide:%python_provide python3-%{pypi_name}}

  

- Requires:       python3dist(toml)

- 

  # colorlog.py is "copied from Tornado", Apache licensed

  Provides:       bundled(python3dist(tornado))

  
@@ -54,6 +43,11 @@ 

  

  # Don't run the linter as part of tests

  sed -i '/^addopts=--flake8$/d' pytest.ini

+ sed -i '/flake8/d' tox.ini

+ 

+ 

+ %generate_buildrequires

+ %pyproject_buildrequires %{?with_tests:-t}

  

  

  %build
@@ -62,25 +56,27 @@ 

  

  %install

  %pyproject_install

+ %pyproject_save_files %{pypi_name}

  

  

  %if %{with tests}

  %check

- export PYTHONPATH=%{buildroot}%{python3_sitelib}

  # "test_meta" skipped as it creates a venv and tries

  # to install to it from PyPI

- %{__python3} -m pytest -v -k "not test_meta"

+ %tox -- -- -v -k "not test_meta"

  %endif

  

  

- %files -n python3-%{pypi_name}

+ %files -n python3-%{pypi_name} -f %{pyproject_files}

  %license LICENSE

  %doc README.rst

- %{python3_sitelib}/%{pypi_name}/

- %{python3_sitelib}/%{pypi_name}-%{version}.dist-info/

  

  

  %changelog

+ * Mon Sep 21 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.0-6

+ - Use %%pyproject_buildrequires to bring in all the needed tools (like pip)

+ - Resolves rhbz#1880983

+ 

  * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-5

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

  

Resolves the problem described in https://bugzilla.redhat.com/show_bug.cgi?id=1880983

Note that there is no knwon build dependency loop here.

1 new commit added

  • Use %pyproject_save_files
3 years ago

The diff looks good to me and CI is happy :thumbsup:

Pull-Request has been merged by churchyard

3 years ago