#1 Change to pyproject-rpm-macros and fix FTBFS with the latest setuptools
Merged 2 years ago by dminer. Opened 2 years ago by cstratak.
rpms/ cstratak/python-datadog pyproject_setuptools  into  rawhide

file modified
+17 -15
@@ -1,19 +1,16 @@ 

- # Enable Python dependency generation

- %{?python_enable_dependency_generator}

- 

  %{!?python3_pkgversion: %global python3_pkgversion 3}

  

  Name:           python-datadog

  Version:        0.44.0

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Summary:        Python wrapper for the Datadog API

  License:        BSD

  

  URL:            https://github.com/DataDog/datadogpy

  Source0:        %{url}/archive/v%{version}/datadogpy-%{version}.tar.gz

  

- BuildRequires:  python%{python3_pkgversion}-setuptools

  BuildRequires:  python%{python3_pkgversion}-devel

+ BuildRequires:  pyproject-rpm-macros

  

  BuildArch:      noarch

  
@@ -24,14 +21,8 @@ 

  server, to interact with Datadog and efficiently report events and metrics.

  

  

- 

  %package -n python%{python3_pkgversion}-datadog

  Summary:        Python wrapper for the Datadog API

- %if %{undefined python_enable_dependency_generator}

- Requires:       python%{python3_pkgversion}-requests >= 2.6.0

- %endif

- 

- %{?python_provide:%python_provide python%{python3_pkgversion}-datadog}

  

  %description -n python%{python3_pkgversion}-datadog

  Datadogpy is a collection of tools suitable for inclusion in existing Python
@@ -39,26 +30,37 @@ 

  top of Datadog's raw HTTP interface and the Agent's StatsD metrics aggregation

  server, to interact with Datadog and efficiently report events and metrics.

  

+ %generate_buildrequires

+ %pyproject_buildrequires -wt

+ 

  %prep

  %autosetup -n datadogpy-%{version} -p1

  

  %build

- %py3_build

+ %pyproject_wheel

  

  %install

- %py3_install

+ %pyproject_install

+ %pyproject_save_files datadog

  

  # Datadog has deprecated this binary name as it conflicts with the sheepdog

  # package, but it still gets built right now.

  rm %{buildroot}/%{_bindir}/dog{,wrap}

  

- %files -n python%{python3_pkgversion}-datadog

+ %check

+ %tox

+ 

+ %files -n python%{python3_pkgversion}-datadog -f %{pyproject_files}

  %license LICENSE

- %{python3_sitelib}/datadog*

  %{_bindir}/dogshell

  %{_bindir}/dogshellwrap

  

  %changelog

+ * Wed Jun 22 2022 Charalampos Stratakis <cstratak@redhat.com> - 0.44.0-3

+ - Change to pyproject-rpm-macros and fix FTBFS with the latest setuptools

+ - Enable tests

+ Resolves: rhbz#2097110

+ 

  * Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.44.0-2

  - Rebuilt for Python 3.11

  

Enable tests

Resolves: rhbz#2097110

The project now uses a different backend (hatchling), and it fails to build with the latest setuptools version.

Changing to pyproject-macros fixes the issue by utilizing the correct backend.

Also enabled tests.

rebased onto b15dd50

2 years ago

Metadata Update from @dminer:
- Request assigned

2 years ago

This LGTM, thanks for the fix!

Pull-Request has been merged by dminer

2 years ago
Metadata