From 5ccc792dc587f85fcf10ba5fa96c53ecfe74e9212298c7967d494127f37c354e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 12 Mar 2020 07:54:03 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-twine?expand=0&rev=26 --- python-twine.changes | 5 +++++ python-twine.spec | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/python-twine.changes b/python-twine.changes index e276757..a93a0a0 100644 --- a/python-twine.changes +++ b/python-twine.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 12 07:53:47 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Tue Feb 25 11:22:38 UTC 2020 - Ondřej Súkup diff --git a/python-twine.spec b/python-twine.spec index a52106e..e1a665b 100644 --- a/python-twine.spec +++ b/python-twine.spec @@ -17,12 +17,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-twine Version: 1.15.0 Release: 0 Summary: Collection of utilities for interacting with PyPI License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/pypa/twine Source: https://files.pythonhosted.org/packages/source/t/twine/twine-%{version}.tar.gz BuildRequires: %{python_module pkginfo >= 1.4.2} @@ -44,9 +44,10 @@ Requires: python-tqdm >= 4.14 Requires(post): update-alternatives Requires(postun): update-alternatives Recommends: python-keyring -%ifpython2 -# tests/test_package.py will fail without pyblake2 +%if %{with python2} BuildRequires: python2-pyblake2 +%endif +%ifpython2 Recommends: python-pyblake2 %endif %python_subpackages