forked from pool/python-apsw
Sync changes to SLFO-1.2 branch
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-apsw
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,22 +15,19 @@
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-apsw
|
||||
Version: 3.50.4.0
|
||||
Version: 3.46.1.0
|
||||
Release: 0
|
||||
Summary: Another Python SQLite Wrapper
|
||||
License: Zlib
|
||||
Group: Development/Libraries/Python
|
||||
URL: https://github.com/rogerbinns/apsw/
|
||||
Source: https://files.pythonhosted.org/packages/source/a/apsw/apsw-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel >= 3.9}
|
||||
Source: https://github.com/rogerbinns/apsw/archive/refs/tags/%{version}.tar.gz#/apsw-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM disable-infinite-recursion-in-tests.patch -- gh#rogerbinns/apsw@0103ade60
|
||||
Patch0: disable-infinite-recursion-in-tests.patch
|
||||
BuildRequires: %{python_module devel >= 3.8}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
@@ -38,13 +35,6 @@ BuildRequires: fdupes
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: pkgconfig(sqlite3) >= 3.44
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
BuildRequires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -55,8 +45,6 @@ complete SQLite API into Python.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n apsw-%{version}
|
||||
# Remove shebang from all Python sources
|
||||
find . -name "*.py" -exec sed -i "/#\!\/usr\/bin\/env python3/d" {} \;
|
||||
|
||||
# See the discussion on gh#rogerbinns/apsw#462
|
||||
cat << EOF >setup.apsw
|
||||
@@ -72,7 +60,6 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
%python_clone -a %{buildroot}%{_bindir}/apsw
|
||||
|
||||
%check
|
||||
# gh#rogerbinns/apsw#462
|
||||
@@ -81,19 +68,9 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
$python -m apsw.tests -v
|
||||
}
|
||||
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative apsw
|
||||
|
||||
%post
|
||||
%python_install_alternative apsw
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative apsw
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%python_alternative %{_bindir}/apsw
|
||||
%{python_sitearch}/apsw
|
||||
%{python_sitearch}/apsw-%{version}*-info
|
||||
|
||||
|
||||
Reference in New Issue
Block a user