Accepting request 856769 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/856769 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-build?expand=0&rev=2
This commit is contained in:
commit
9bb48f9266
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 17 14:52:54 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Add remove-unused-import.patch to work with importlib_metadata
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 13 11:14:24 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
Fri Nov 13 11:14:24 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
# TW defined --without python2
|
||||||
|
%bcond_without python2
|
||||||
Name: python-build
|
Name: python-build
|
||||||
Version: 0.1.0
|
Version: 0.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -25,25 +27,36 @@ License: MIT
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/pypa/build
|
URL: https://github.com/pypa/build
|
||||||
Source: https://github.com/pypa/build/archive/%{version}.tar.gz#/build-%{version}.tar.gz
|
Source: https://github.com/pypa/build/archive/%{version}.tar.gz#/build-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM remove-unused-import.patch -- remove unused import https://github.com/pypa/build/commit/efa3710
|
||||||
|
Patch0: remove-unused-import.patch
|
||||||
|
BuildRequires: %{python_module packaging}
|
||||||
|
BuildRequires: %{python_module pep517 >= 0.9}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module toml}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
%if %{with python2}
|
||||||
|
BuildRequires: python-typing
|
||||||
|
BuildRequires: python-virtualenv >= 20.0.35
|
||||||
|
%endif
|
||||||
|
BuildRequires: (python3-importlib_metadata if python3-base < 3.8)
|
||||||
|
BuildRequires: (python36-importlib_metadata if python36-base)
|
||||||
Requires: python-packaging
|
Requires: python-packaging
|
||||||
Requires: python-pep517 >= 0.9
|
Requires: python-pep517 >= 0.9
|
||||||
Requires: python-toml
|
Requires: python-toml
|
||||||
|
Requires: (python-importlib_metadata if python-base < 3.8)
|
||||||
|
%ifpython2
|
||||||
Requires: python-typing
|
Requires: python-typing
|
||||||
|
Requires: python-virtualenv >= 20.0.35
|
||||||
|
%endif
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module filelock}
|
BuildRequires: %{python_module filelock}
|
||||||
BuildRequires: %{python_module packaging}
|
|
||||||
BuildRequires: %{python_module pep517 >= 0.9}
|
|
||||||
BuildRequires: %{python_module pytest-mock}
|
BuildRequires: %{python_module pytest-mock}
|
||||||
|
BuildRequires: %{python_module pytest-xdist}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module toml}
|
|
||||||
BuildRequires: %{python_module typing}
|
|
||||||
BuildRequires: %{python_module virtualenv}
|
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -51,7 +64,7 @@ BuildRequires: %{python_module virtualenv}
|
|||||||
Simple PEP517 package builder.
|
Simple PEP517 package builder.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n build-%{version}
|
%autosetup -p1 -n build-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
20
remove-unused-import.patch
Normal file
20
remove-unused-import.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Index: build-0.1.0/tests/test_projectbuilder.py
|
||||||
|
===================================================================
|
||||||
|
--- build-0.1.0.orig/tests/test_projectbuilder.py
|
||||||
|
+++ build-0.1.0/tests/test_projectbuilder.py
|
||||||
|
@@ -13,15 +13,10 @@ import pytest
|
||||||
|
import build
|
||||||
|
|
||||||
|
if sys.version_info >= (3, 8): # pragma: no cover
|
||||||
|
- import email
|
||||||
|
from importlib import metadata as importlib_metadata
|
||||||
|
-
|
||||||
|
- email_message_from_string = email.message_from_string
|
||||||
|
else: # pragma: no cover
|
||||||
|
import importlib_metadata
|
||||||
|
|
||||||
|
- email_message_from_string = importlib_metadata._compat.email_message_from_string
|
||||||
|
-
|
||||||
|
if sys.version_info >= (3,): # pragma: no cover
|
||||||
|
build_open_owner = 'builtins'
|
||||||
|
else: # pragma: no cover
|
Loading…
Reference in New Issue
Block a user