commit 0e615da4928978737de6a0918b1c152c74637cd4 Author: Andrew Lukoshko Date: Thu Mar 19 11:23:23 2026 +0000 import EPEL python-apt-3.1.0-2.el10_3 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea781bc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/python-apt-3.1.0.tar.gz diff --git a/.python-apt.metadata b/.python-apt.metadata new file mode 100644 index 0000000..228774c --- /dev/null +++ b/.python-apt.metadata @@ -0,0 +1 @@ +62432e4dcd3a979e524c601d3521369d7c04ff63 SOURCES/python-apt-3.1.0.tar.gz diff --git a/SOURCES/python-apt-3.1.0-remove-stubs.patch b/SOURCES/python-apt-3.1.0-remove-stubs.patch new file mode 100644 index 0000000..8c1a681 --- /dev/null +++ b/SOURCES/python-apt-3.1.0-remove-stubs.patch @@ -0,0 +1,18 @@ +diff --git a/setup.py b/setup.py +index 9648d87..6cd1c19 100644 +--- a/setup.py ++++ b/setup.py +@@ -26,13 +26,6 @@ else: + class InstallTypeinfo(install): + def run(self): + install.run(self) +- for pyi in glob.glob("typehinting/*.pyi"): +- stubs = os.path.basename(pyi).split(".")[0] + "-stubs" +- stubs = os.path.join(self.install_purelib, stubs) +- if not os.path.exists(stubs): +- os.makedirs(stubs) +- shutil.copy(pyi, os.path.join(stubs, "__init__.pyi")) +- + + cmdclass["install"] = InstallTypeinfo + diff --git a/SPECS/python-apt.spec b/SPECS/python-apt.spec new file mode 100644 index 0000000..c29bf08 --- /dev/null +++ b/SPECS/python-apt.spec @@ -0,0 +1,140 @@ +# Enable generated Python dependencies on EL8 +%{?python_enable_dependency_generator} + +Name: python-apt +Version: 3.1.0 +Release: 2%{?dist} +Summary: Python bindings for APT +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +URL: https://tracker.debian.org/pkg/python-apt +Source0: https://salsa.debian.org/apt-team/%{name}/-/archive/%{version}/%{name}-%{version}.tar.gz +Patch: python-apt-3.1.0-remove-stubs.patch + +# Requires Debian's apt +BuildRequires: apt-devel >= 2.0.0 +BuildRequires: dpkg-dev +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: python3-devel +BuildRequires: python3dist(python-distutils-extra) +BuildRequires: python3dist(setuptools) +BuildRequires: zlib-devel + +%description +python-apt is a wrapper to use features of APT from Python. + +%package -n python3-apt +Summary: Python 3 bindings for APT +# Without dpkg installed, it crashes +Requires: dpkg +# Needed for source format support +Recommends: dpkg-dev + +%description -n python3-apt +The apt_pkg Python 3 interface will provide full access to the internal +libapt-pkg structures allowing Python 3 programs to easily perform a +variety of functions, such as: + + - Access to the APT configuration system + - Access to the APT package information database + - Parsing of Debian package control files, and other files with a + similar structure + +The included 'aptsources' Python interface provides an abstraction of +the sources.list configuration on the repository and the distro level. + + +%prep +%autosetup -p1 +%generate_buildrequires +%pyproject_buildrequires + +%build +# Deal with python-apt not having proper default version set by using debver hack +export DEBVER="%{version}" +%pyproject_wheel + +%install +# Deal with python-apt not having proper default version set by using debver hack +export DEBVER="%{version}" +%pyproject_install +%pyproject_save_files -l apt aptsources apt_inst apt_pkg + +%check +%pyproject_check_import + +%files -n python3-apt -f %{pyproject_files} +%license COPYING.GPL +%doc README.md +%{_datadir}/locale/*/LC_MESSAGES/python-apt.mo +%{_datadir}/python-apt/ + +%changelog +* Mon Feb 16 2026 Terje Røsten - 3.1.0-2 +- Use modern Python macros + +* Mon Feb 16 2026 Terje Røsten - 3.1.0-1 +- Rebuild for so bump in apt 3.1.15 +- 3.1.0 + +* Sat Jan 17 2026 Fedora Release Engineering - 2.3.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Fri Sep 19 2025 Python Maint - 2.3.0-16 +- Rebuilt for Python 3.14.0rc3 bytecode + +* Fri Aug 15 2025 Python Maint - 2.3.0-15 +- Rebuilt for Python 3.14.0rc2 bytecode + +* Fri Jul 25 2025 Fedora Release Engineering - 2.3.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Mon Jun 02 2025 Python Maint - 2.3.0-13 +- Rebuilt for Python 3.14 + +* Sat Jan 18 2025 Fedora Release Engineering - 2.3.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 26 2024 Miroslav Suchý - 2.3.0-11 +- convert license to SPDX + +* Fri Jul 19 2024 Fedora Release Engineering - 2.3.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 2.3.0-9 +- Rebuilt for Python 3.13 + +* Fri Jan 26 2024 Fedora Release Engineering - 2.3.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 2.3.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 2.3.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 2.3.0-5 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 2.3.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 2.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 2.3.0-2 +- Rebuilt for Python 3.11 + +* Thu Jan 27 2022 Neal Gompa - 2.3.0-1 +- Update to 2.3.0 (#1979091) +- Require dpkg so using it doesn't crash (#2016019) + +* Fri Jan 21 2022 Fedora Release Engineering - 2.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 2.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 25 2021 Neal Gompa - 2.2.0-1 +- Initial package (#1974787)