Update to 0.1.12
This commit is contained in:
parent
6a1b41cf35
commit
5e2a5f6aaf
50
50.patch
50
50.patch
@ -1,50 +0,0 @@
|
|||||||
From 45d0154a1e0bf167656d1ef4050de782452aad2c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Victor Stinner <vstinner@redhat.com>
|
|
||||||
Date: Wed, 31 Jul 2019 15:03:36 +0200
|
|
||||||
Subject: [PATCH] Fix Python method descriptors for Python 3.8
|
|
||||||
|
|
||||||
The Python binding cannot be loaded in Python 3.8: import libcomps
|
|
||||||
fails with:
|
|
||||||
|
|
||||||
Traceback (most recent call last):
|
|
||||||
File "src/python/src/python3/libcomps/__init__.py", line 1, in <module>
|
|
||||||
from ._libpycomps import *
|
|
||||||
SystemError: bad call flags
|
|
||||||
|
|
||||||
Fedora bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1734777
|
|
||||||
|
|
||||||
The problem are the following method descriptors of
|
|
||||||
libcomps/src/python/src/pycomps.c:
|
|
||||||
|
|
||||||
{"categories_match", (PyCFunction)PyCOMPS_categories_match, METH_KEYWORDS,
|
|
||||||
PyCOMPS_validate__doc__},
|
|
||||||
{"environments_match", (PyCFunction)PyCOMPS_envs_match, METH_KEYWORDS,
|
|
||||||
PyCOMPS_validate__doc__},
|
|
||||||
|
|
||||||
In Python 3.7, import didn't check descriptor flags (METH_KEYWORDS):
|
|
||||||
these flags were only checked when the methods were called.
|
|
||||||
|
|
||||||
In Python 3.8, the flags are checked at soon as the module is
|
|
||||||
imported, which prevents the module to be imported.
|
|
||||||
|
|
||||||
This change fix the two method descriptors.
|
|
||||||
---
|
|
||||||
libcomps/src/python/src/pycomps.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libcomps/src/python/src/pycomps.c b/libcomps/src/python/src/pycomps.c
|
|
||||||
index b34685c..293a338 100644
|
|
||||||
--- a/libcomps/src/python/src/pycomps.c
|
|
||||||
+++ b/libcomps/src/python/src/pycomps.c
|
|
||||||
@@ -766,9 +766,9 @@ PyDoc_STRVAR(PyCOMPS_arch_filter__doc__,
|
|
||||||
static PyMethodDef PyCOMPS_methods[] = {
|
|
||||||
{"groups_match", (PyCFunction)PyCOMPS_groups_match, METH_VARARGS | METH_KEYWORDS,
|
|
||||||
PyCOMPS_validate__doc__},
|
|
||||||
- {"categories_match", (PyCFunction)PyCOMPS_categories_match, METH_KEYWORDS,
|
|
||||||
+ {"categories_match", (PyCFunction)PyCOMPS_categories_match, METH_VARARGS | METH_KEYWORDS,
|
|
||||||
PyCOMPS_validate__doc__},
|
|
||||||
- {"environments_match", (PyCFunction)PyCOMPS_envs_match, METH_KEYWORDS,
|
|
||||||
+ {"environments_match", (PyCFunction)PyCOMPS_envs_match, METH_VARARGS | METH_KEYWORDS,
|
|
||||||
PyCOMPS_validate__doc__},
|
|
||||||
{"validate", (PyCFunction)PyCOMPS_validate, METH_NOARGS,
|
|
||||||
PyCOMPS_validate__doc__},
|
|
@ -13,14 +13,13 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: libcomps
|
Name: libcomps
|
||||||
Version: 0.1.11
|
Version: 0.1.12
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Comps XML file manipulation library
|
Summary: Comps XML file manipulation library
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/rpm-software-management/libcomps
|
URL: https://github.com/rpm-software-management/libcomps
|
||||||
Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch1: %{url}/pull/50.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
@ -171,6 +170,7 @@ popd
|
|||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_libdir}/%{name}.so
|
%{_libdir}/%{name}.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
%{_includedir}/%{name}/
|
%{_includedir}/%{name}/
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
@ -182,14 +182,19 @@ popd
|
|||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
%files -n python2-%{name}
|
%files -n python2-%{name}
|
||||||
%{python2_sitearch}/%{name}/
|
%{python2_sitearch}/%{name}/
|
||||||
|
%{python2_sitearch}/%{name}-%{version}-py%{python2_version}.egg-info
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%files -n python3-%{name}
|
%files -n python3-%{name}
|
||||||
%{python3_sitearch}/%{name}/
|
%{python3_sitearch}/%{name}/
|
||||||
|
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 29 2019 Ales Matej <amatej@redhat.com> - 0.1.12-1
|
||||||
|
- Update to 0.1.12
|
||||||
|
|
||||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1.11-5
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1.11-5
|
||||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (libcomps-0.1.11.tar.gz) = eeb1749b48be4497f85bc2296d919b25ca59bb3dfe97fe84abfd5ef49b66d29946b08e3d1f560bf843d9d2aed17f878132caee55e4949a37af82cc8a92e5e99a
|
SHA512 (libcomps-0.1.12.tar.gz) = 1e13c03d6aafe9e5f69677f05c6b83153c2c2b6415a87b0f412cf956daee17821248138eb5dfeea4de8a396d29b189d8c00b35f3d9a4d0466ae15d8c41b817c5
|
||||||
|
Loading…
Reference in New Issue
Block a user