File python-npyosmium.spec of Package python-npyosmium
#
# spec file for package python-npyosmium
#
# 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}
%define basepkgname npyosmium
Name: python-%{basepkgname}
Version: 3.6.3
Release: 0
Summary: Fork of pyosmium, including an efficient numpy interface
License: BSD-2-Clause
URL: https://github.com/agrenott/npyosmium
Source: https://github.com/agrenott/%{basepkgname}/archive/refs/tags/v%{version}.tar.gz#/%{basepkgname}-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module pybind11-devel >= 2.2.0}
BuildRequires: %{python_module packaging}
BuildRequires: fdupes
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libexpat-devel
BuildRequires: libbz2-devel
BuildRequires: zlib-devel
BuildRequires: liblz4-devel
BuildRequires: boost-devel >= 1.41.0
BuildRequires: libosmium-devel >= 2.16.0
BuildRequires: libprotozero-devel
Requires: python-requests
Requires(post): update-alternatives
%python_subpackages
%description
Fork of pyosmium, including (only one for the time being) efficient numpy interface.
Provides Python bindings for the Libosmium C++ library, a library for working with OpenStreetMap data in a fast and flexible manner.
%prep
%autosetup -n %{basepkgname}-%{version}
%build
export CFLAGS="%{optflags}"
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/%{basepkgname}-get-changes
%python_clone -a %{buildroot}%{_bindir}/%{basepkgname}-up-to-date
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%post
%python_install_alternative %{basepkgname}-get-changes %{basepkgname}-up-to-date
%postun
%python_uninstall_alternative %{basepkgname}-get-changes
%files %{python_files}
%doc CHANGELOG.md README.md
%license LICENSE.TXT
%python_alternative %{_bindir}/%{basepkgname}-get-changes
%python_alternative %{_bindir}/%{basepkgname}-up-to-date
%{python_sitearch}/%{basepkgname}
%{python_sitearch}/%{basepkgname}-%{version}.dist-info
%changelog