scripts/pythondistdeps: Fix for Python 3.10

self.name in PathDistribution is a property in Python 3.10+ and thus we
can't redefine it as an instance variable. Instead we explicitly define
it as a property, which works on all supported Python versions.
This commit is contained in:
Tomas Orsava 2021-02-22 13:16:24 +01:00 committed by Miro Hrončok
commit 48510eebae
2 changed files with 13 additions and 2 deletions

View file

@ -1,7 +1,7 @@
Name: python-rpm-generators
Summary: Dependency generators for Python RPMs
Version: 12
Release: 2%{?dist}
Release: 3%{?dist}
# Originally all those files were part of RPM, so license is kept here
License: GPLv2+
@ -47,6 +47,9 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} *.py
%{_rpmconfigdir}/pythonbundles.py
%changelog
* Mon Feb 22 2021 Tomas Orsava <torsava@redhat.com> - 12-3
- scripts/pythondistdeps: Fix for Python 3.10
* Wed Feb 17 2021 Tomas Orsava <torsava@redhat.com> - 12-2
- scripts/pythondistdeps: Switch from using pkg_resources to importlib.metadata
for reading the egg/dist-info metadata