python-mongo_tooling_metrics/python-mongo_tooling_metrics.spec

58 lines
1.8 KiB
RPMSpec
Raw Permalink Normal View History

%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-mongo_tooling_metrics
Version: 1.0.8
Release: 1mamba
Summary: A slim library which leverages Pydantic to reliably collect type enforced metrics and store them to MongoDB
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.mongodb.com
Source: http://pypi.debian.net/mongo-tooling-metrics/mongo_tooling_metrics-%{version}.tar.gz
License: Affero GNU Public License, Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: libpython311-devel
BuildRequires: python3.11dist(distro)
BuildRequires: python3.11dist(gitpython)
BuildRequires: python3.11dist(pydantic)
BuildRequires: python3.11dist(pymongo)
BuildRequires: python3.11dist(setuptools)
## AUTOBUILDREQ-END
%description
%{summary}.
%if 0%{?with_pyver}
%pyver_package
%endif
%prep
%setup -q -n mongo_tooling_metrics-%{version}
sed -i "s|pydantic =.*|pydantic = \">=1.8.2\"|" pyproject.toml
sed -i "s|setuptools =.*|setuptools = \">=58.1.0\"|" pyproject.toml
%build
CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} -m installer --destdir=%{buildroot} dist/*.whl
#%if "%{?with_pyver}" != "3"
## Rename any conflicting file outside of python site packages tree
#for f in %{_bindir}/pdm; do
# mv %{buildroot}${f}{,-%{?pyappend}}
#done
#%endif
%files %{?pyappend}
%defattr(-,root,root)
%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info
%{python_sitelib}/%{pkgname}-%{version}.dist-info/*
%dir %{python_sitelib}/%{pkgname}
%{python_sitelib}/%{pkgname}/*
%changelog
* Thu Oct 19 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.8-1mamba
- package created using the webbuild interface