From 9c7a52e0948c098868d5b6f169c28b5bc487c353 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 05 2019 19:39:20 +0000 Subject: import python-augeas-0.5.0-12.el8 --- diff --git a/SOURCES/0001-test-fix-discovery-of-location.patch b/SOURCES/0001-test-fix-discovery-of-location.patch new file mode 100644 index 0000000..0753b84 --- /dev/null +++ b/SOURCES/0001-test-fix-discovery-of-location.patch @@ -0,0 +1,29 @@ +From 1d416bb862a4b85b85ad7a4be4ba106703d975ec Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Fri, 12 Oct 2018 12:50:18 +0200 +Subject: [PATCH] test: fix discovery of location + +Use __file__ to detect the location of the script instead of sys.argv, +so it will work also when loaded as module. + +(cherry picked from commit d93e1563add8c40450556b7d74520439ee792bd9) +--- + test/test_augeas.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test_augeas.py b/test/test_augeas.py +index 10edbe6..7474841 100644 +--- a/test/test_augeas.py ++++ b/test/test_augeas.py +@@ -4,7 +4,7 @@ import unittest + import sys + import os + +-__mydir = os.path.dirname(sys.argv[0]) ++__mydir = os.path.dirname(os.path.abspath(__file__)) + if not os.path.isdir(__mydir): + __mydir = os.getcwd() + +-- +2.21.0 + diff --git a/SPECS/python-augeas.spec b/SPECS/python-augeas.spec index 9c22f26..e42b172 100644 --- a/SPECS/python-augeas.spec +++ b/SPECS/python-augeas.spec @@ -1,15 +1,17 @@ Name: python-augeas Version: 0.5.0 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Python bindings to augeas Group: Development/Languages License: LGPLv2+ URL: http://augeas.net/ Source0: http://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz +Patch1: 0001-test-fix-discovery-of-location.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python3-setuptools python3-devel +BuildRequires: augeas python3-pytest %description python-augeas is a set of Python bindings around augeas. @@ -25,10 +27,14 @@ python3-augeas is a set of Python bindings around augeas. %prep %setup -q +%patch1 -p1 %{py3_build} %{py3_install} +%check +pytest-3 + %files -n python3-augeas %license COPYING %doc AUTHORS README.txt @@ -38,6 +44,9 @@ python3-augeas is a set of Python bindings around augeas. %changelog +* Tue May 14 2019 Pino Toscano - 0.5.0-12 +- Run the tests during the build (RHBZ#1682268). + * Fri Feb 09 2018 Fedora Release Engineering - 0.5.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild