15
0
forked from pool/python-apsw
Files
python-apsw/python-apsw.spec

68 lines
2.1 KiB
RPMSpec
Raw Normal View History

#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-apsw
Version: 3.40.1.0
Release: 0
Summary: Another Python SQLite Wrapper
License: Zlib
Group: Development/Libraries/Python
URL: https://github.com/rogerbinns/apsw/
- update to 3.40.0.0: * Fixed regression in statement cache update (version 3.38.1-r1) where trailing whitespace in queries would be incorrectly treated as incomplete execution (APSW issue 376) * Added Various interesting and useful bits of functionality (APSW issue 369) * Added more Pythonic attributes as an alternative to getters and setters, including Connection.in_transaction, Connection.exectrace, Connection.rowtrace, Cursor.exectrace, Cursor.rowtrace, Cursor.connection (APSW issue 371) * Completed: To the extent permitted by CPython APIs every item has the same docstring as this documentation. Every API can use named parameters. The type stubs cover everything including constants. The type stubs also include documentation for everything, which for example Visual Studio Code displays as you type or hover. There is a single source of documentation in the source code, which is then automatically extracted to make this documentation, docstrings, and docstrings in the type stubs. * Example/Tour updated and appearance improved (APSW issue 367). * Added Connection.cache_stats() to provide more information about the statement cache. * Cursor.execute() now uses sqlite_prepare_v3 which allows supplying flags. * Cursor.execute() has a new can_cache parameter to control whether the query can use the statement cache. One example use is with authorizers because they only run during prepare, which doesn’t happen with already cached statements. * (The Cursor.execute() additional parameters are keyword only and also present in Cursor.executemany(), and the corresponding Connection.execute() and Connection.executemany() methods.) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apsw?expand=0&rev=27
2022-12-05 21:13:25 +00:00
Source: https://github.com/rogerbinns/apsw/archive/%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(sqlite3) >= 3.30
%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
- update to 3.40.0.0: * Fixed regression in statement cache update (version 3.38.1-r1) where trailing whitespace in queries would be incorrectly treated as incomplete execution (APSW issue 376) * Added Various interesting and useful bits of functionality (APSW issue 369) * Added more Pythonic attributes as an alternative to getters and setters, including Connection.in_transaction, Connection.exectrace, Connection.rowtrace, Cursor.exectrace, Cursor.rowtrace, Cursor.connection (APSW issue 371) * Completed: To the extent permitted by CPython APIs every item has the same docstring as this documentation. Every API can use named parameters. The type stubs cover everything including constants. The type stubs also include documentation for everything, which for example Visual Studio Code displays as you type or hover. There is a single source of documentation in the source code, which is then automatically extracted to make this documentation, docstrings, and docstrings in the type stubs. * Example/Tour updated and appearance improved (APSW issue 367). * Added Connection.cache_stats() to provide more information about the statement cache. * Cursor.execute() now uses sqlite_prepare_v3 which allows supplying flags. * Cursor.execute() has a new can_cache parameter to control whether the query can use the statement cache. One example use is with authorizers because they only run during prepare, which doesn’t happen with already cached statements. * (The Cursor.execute() additional parameters are keyword only and also present in Cursor.executemany(), and the corresponding Connection.execute() and Connection.executemany() methods.) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apsw?expand=0&rev=27
2022-12-05 21:13:25 +00:00
%setup -q -n apsw-%{version}
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
#%%python_build
%{python_expand $python setup.py build --enable-all-extensions --enable=load_extension}
%install
%python_install
%check
# python setup.py test is in this case very complicated home-brewn,
# and using unittest, so it shouldn't be affected by changes in
# setuptools.
export CFLAGS="%{optflags} -fno-strict-aliasing"
%{python_expand $python setup.py build_ext --inplace
$python setup.py test
$python setup.py clean
}
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitearch}/*
%changelog