From 6ae120b9db329e5476df945a5d0c91638d911a3ddc0c87ca960d9457604e97c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 16 Mar 2020 10:30:40 +0000 Subject: [PATCH] - Fix build without python2 - Really execute tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-entrypoints?expand=0&rev=12 --- python-entrypoints.changes | 6 ++++++ python-entrypoints.spec | 21 +++++++-------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/python-entrypoints.changes b/python-entrypoints.changes index f616a5d..55cadf7 100644 --- a/python-entrypoints.changes +++ b/python-entrypoints.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 16 10:30:18 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 +- Really execute tests + ------------------------------------------------------------------- Mon Feb 4 17:49:04 UTC 2019 - Hans-Peter Jansen diff --git a/python-entrypoints.spec b/python-entrypoints.spec index 135ff11..2b2b246 100644 --- a/python-entrypoints.spec +++ b/python-entrypoints.spec @@ -1,7 +1,7 @@ # # spec file for package python-entrypoints # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,22 +17,21 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without test +%bcond_without python2 Name: python-entrypoints Version: 0.3 Release: 0 Summary: Discover and load entry points from installed packages License: MIT -Group: Development/Languages/Python URL: https://github.com/takluyver/entrypoints Source: https://files.pythonhosted.org/packages/source/e/entrypoints/entrypoints-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch -BuildRequires: %{python_module devel} -%if %{with test} -BuildRequires: %{python_module pytest} -BuildRequires: python-configparser +%if %{with python2} +BuildRequires: python-configparser >= 3.5 %endif %ifpython2 Requires: python-configparser >= 3.5 @@ -59,14 +58,8 @@ plugins, or multiple groups if it has different kinds of plugins. %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with test} %check -pushd tests -%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} -$python test_entrypoints.py -} -popd -%endif +%pytest %files %{python_files} %license LICENSE