diff --git a/python-cogapp.changes b/python-cogapp.changes index 523db92..9c4acb5 100644 --- a/python-cogapp.changes +++ b/python-cogapp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri May 7 20:31:02 UTC 2021 - Ben Greiner + +- always use absoulte import paths for -I parameter: mitigate + failure due to bpo-43105 fix. + ------------------------------------------------------------------- Fri Apr 5 11:14:30 UTC 2019 - Tomáš Chvátal diff --git a/python-cogapp.spec b/python-cogapp.spec index e8cbf2e..7ba0d4d 100644 --- a/python-cogapp.spec +++ b/python-cogapp.spec @@ -1,7 +1,7 @@ # # spec file for package python-cogapp # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,7 +30,7 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives BuildArch: noarch %python_subpackages @@ -41,6 +41,9 @@ need. %prep %setup -q -n cogapp-%{version} +# The fix for bpo-43105 broke cogapp's way to import relative paths +# https://github.com/nedbat/cog/issues/16 +sed -i 's/self.addToIncludePath(a)/self.addToIncludePath(os.path.abspath(a))/' cogapp/cogapp.py %build %python_build @@ -52,7 +55,8 @@ mv %{buildroot}%{_bindir}/cog.py %{buildroot}%{_bindir}/cog %python_clone -a %{buildroot}%{_bindir}/cog %check -%pytest +# reverse -q from addopts in setup.cfg +%pytest -v %post %python_install_alternative cog