python-BTrees/python-BTrees.spec
Hans-Peter Jansen 6a7a43a093 Accepting request 673139 from home:jayvdb:branches:devel:languages:python
- Update to v4.5.1
  + Use pyproject.toml to specify build dependencies. This requires pip
    18 or later to build from source.
- 4.5.0
  + Add support for Python 3.6 and 3.7, and drop support for Python 3.3.
  + Raise an ``ImportError`` consistently on Python 3 if the C extension for
    BTrees is used but the ``persistent`` C extension is not available.
    Previously this could result in an odd ``AttributeError``.
  + Fix the possibility of a rare crash in the C extension when
    deallocating items.
  + Respect the ``PURE_PYTHON`` environment variable at runtime even if
    the C extensions are available.
  + Always attempt to build the C extensions, but make their success
    optional.
  + Fix a ``DeprecationWarning`` that could come from I and L objects in
    Python 2 in pure-Python mode.
- Use %license

OBS-URL: https://build.opensuse.org/request/show/673139
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-BTrees?expand=0&rev=10
2019-02-10 11:47:44 +00:00

106 lines
3.4 KiB
RPMSpec

#
# spec file for package python-BTrees
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
#
# 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-BTrees
Version: 4.5.1
Release: 0
Summary: Persistent B-tree object containers for Python
License: ZPL-2.1
Group: Development/Libraries/Python
Url: http://www.zope.org/Products/ZODB
Source: https://files.pythonhosted.org/packages/source/B/BTrees/BTrees-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module persistent-devel >= 4.1.0}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module zope.interface}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# Documentation requirements:
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module repoze.sphinx.autointerface}
# Testing requirements:
BuildRequires: %{python_module transaction}
BuildRequires: %{python_module zope.testrunner}
Requires: python-persistent >= 4.1.0
Requires: python-zope.interface
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
This package contains a generic BTrees implementation for Python. It is
mainly used by the ZODB, though.
Note that the data manager API, BTrees.interfaces.IDataManager, is
syntactically simple, but semantically complex. The semantics were not easy to
express in the interface. This could probably use more work. The semantics are
presented in detail through examples of a sample data manager in
BTrees.tests.test_SampleDataManager.
%package devel
Summary: Development files for the python-BTrees module
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description devel
This package contains the files needed for binding the %{name} C module.
%package doc
Summary: Documentation for the python-BTrees module
Group: Development/Libraries/Python
Requires: %{name} = %{version}
%description doc
This package contains documentation files for %{name}.
%prep
%setup -q -n BTrees-%{version}
rm -rf BTrees.egg-info
%build
%python_build
%{_python_use_flavor python3}
%__python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
%{python_expand rm %{buildroot}%{$python_sitearch}/BTrees/*.c
%fdupes -s %{buildroot}%{$python_sitearch}
}
%check
%python_exec setup.py -q test
%files %{python_files}
%defattr(-,root,root)
%doc CHANGES.rst README.rst PKG-INFO
%license COPYRIGHT.txt LICENSE.txt
%exclude %{python_sitearch}/BTrees/*.h
%{python_sitearch}/*
%files %{python_files devel}
%defattr(-,root,root,-)
%{python_sitearch}/BTrees/*.h
%files %{python_files doc}
%defattr(-,root,root,-)
%doc build/sphinx/html/
%changelog