15
0
forked from pool/python-apsw
Files
python-apsw/python-apsw.spec
Matej Cepl 9bcf386c18 Accepting request 1115988 from home:ecsos:python
- Update to 3.43.1.0
  - All C code calling into Python and all C code called by Python
    uses vectorcall / fastcall (see PEP 590) which reduces the
    overhead of passing and receiving positional and keyword
    arguments. (APSW issue 477 APSW issue 446):
    * Conversion of arguments from Python values to C values drops
      generic PyArg_ParseTupleAndKeywords in favour of direct
      processing which is more efficient and allows better
      exception messages.
    * Running speedtest with a VFS that inherits all methods went
      from being 17% slower than pure SQLite to 2% slower.
    * A virtual table benchmark takes 35% less time. (Remember that
      benchmarks are best case!)
  - The shell JSON output modes have been fixed. Mode 'json'
    outputs a json array, while mode 'jsonl' does newline delimited
    json objects, aka json lines. (APSW issue 483)
- Changes from 3.43.1.0
  - This is the last version that supports Python 3.6 and
    Python 3.7 (both end of life). The policy as stated in the
    about page is that there will be one more APSW release after
    a Python version goes end of life supporting that Python
    version. (APSW issue 471)
  - Added best practice module (APSW issue 460)
  - apsw.ext.log_sqlite() outputs SQLite warnings at warning level.
    (APSW issue 472)
  - sqlite3_stmt_explain is wrapped available as a explain keyword
    parameter on execute/executemany methods. (APSW issue 474)
  - Added documentation and helper class for implementing custom
    pragmas in your own Virtual File System (VFS) (APSW issue 464)
  - Reduced overhead of the Column method when using 
    apsw.ext.make_virtual_module() (APSW issue 465)

OBS-URL: https://build.opensuse.org/request/show/1115988
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apsw?expand=0&rev=41
2023-10-06 12:49:04 +00:00

75 lines
2.3 KiB
RPMSpec

#
# spec file for package python-apsw
#
# Copyright (c) 2023 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/
#
%{?sle15_python_module_pythons}
Name: python-apsw
Version: 3.43.1.0
Release: 0
Summary: Another Python SQLite Wrapper
License: Zlib
Group: Development/Libraries/Python
URL: https://github.com/rogerbinns/apsw/
Source: https://github.com/rogerbinns/apsw/archive/refs/tags/%{version}.tar.gz#/apsw-%{version}.tar.gz
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(sqlite3) >= 3.43.1
%python_subpackages
%description
APSW is a Python wrapper for the SQLite embedded relational database
engine. In contrast to other wrappers such as pysqlite it focuses on
being a minimal layer over SQLite attempting just to translate the
complete SQLite API into Python.
%prep
%autosetup -p1 -n apsw-%{version}
# See the discussion on gh#rogerbinns/apsw#462
cat << EOF >setup.apsw
[build_ext]
use_system_sqlite_config = true
EOF
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%pyproject_wheel
%python_exec setup.py build_test_extension
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# gh#rogerbinns/apsw#462
# We cannot use %%pyunittest_arch here, see the ticket for the discussion
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} PYTHONDONTWRITEBYTECODE=1
$python -m apsw.tests -v
}
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitearch}/apsw
%{python_sitearch}/apsw-%{version}*-info
%changelog