Files
saltbundlepy-apt-debian11-12/saltbundlepy-apt-debian11-12.spec
2025-12-20 13:38:03 +01:00

116 lines
3.7 KiB
RPMSpec

#
# spec file for package saltbundlepy-apt
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!saltbundlepy_module:%define saltbundlepy_module() saltbundlepy-%{**}}
%define pythons saltbundlepy
%define realname saltbundlepy-apt
Name: saltbundlepy-apt-debian11-12
Version: 2.2.1
Release: 0
Summary: Python interface to libapt-pkg
License: GPL-2.0-only
Group: Development/Libraries/Python
URL: https://launchpad.net/python-apt
Source: https://deb.debian.org/debian/pool/main/p/python-apt/python-apt_%{version}.tar.xz
BuildRequires: %{saltbundlepy_module devel >= 3.10}
BuildRequires: %{saltbundlepy_module setuptools-scm}
BuildRequires: fdupes
BuildRequires: libapt-pkg-dev
BuildRequires: saltbundlepy-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Only build for Debian 11 and 12
%if ! (0%{?debian} && (0%{?debian} == 11 || 0%{?debian} == 12))
ExclusiveArch: do_not_build
%endif
%description
Python interface to libapt-pkg
The apt_pkg Python interface will provide full access to the internal
libapt-pkg structures allowing Python 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.
%package -n %{realname}
Summary: Python interface to libapt-pkg
License: GPL-2.0-only
Group: Development/Libraries/Python
Requires: saltbundlepy-apt-common
%python_subpackages
%description -n %{realname}
Python interface to libapt-pkg
The apt_pkg Python interface will provide full access to the internal
libapt-pkg structures allowing Python 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.
%package -n %{realname}-common
Summary: Python interface to libapt-pkg (locales)
Group: Development/Libraries/Python
BuildArch: noarch
Provides: %{saltbundlepy_module apt-common}
%description -n %{realname}-common
Python interface to libapt-pkg (locales)
The apt_pkg Python interface will provide full access to the internal
libapt-pkg structures allowing Python programs to easily perform a
variety of functions.
This package contains locales.
%prep
%setup -q -n python-apt-%{version}
sed -i "s|version=get_version()|version='%{version}'|" setup.py
%build
DEBVER="%{version}"
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files -n %{realname}
%license COPYING.GPL
%doc README.md AUTHORS
%{python_sitelib}
%files -n %{realname}-common
%license COPYING.GPL
%doc README.md AUTHORS
%{_datadir}/python-apt/templates
%changelog