#1 spec: add use-setuptools.patch to fix FTBFS
Opened 7 months ago by michaelvogt. Modified 7 months ago
rpms/ michaelvogt/python-yamlordereddictloader rawhide  into  rawhide

@@ -9,9 +9,12 @@ 

  License:	MIT

  URL:		https://github.com/fmenabe/python-yamlordereddictloader

  Source0:	https://files.pythonhosted.org/packages/source/y/%{srcname}/%{srcname}-%{version}.tar.gz

+ # From https://github.com/fmenabe/python-yamlordereddictloader/pull/9

+ Patch0:         use-setuptools.patch

  

  BuildRequires:	python%{python3_pkgversion}-devel

  BuildRequires:	python%{python3_pkgversion}-PyYAML

+ BuildRequires:	python%{python3_pkgversion}-setuptools

  

  BuildArch: noarch

  
@@ -34,7 +37,7 @@ 

  

  %prep

  %setup -q -n %{srcname}-%{version}

- 

+ %patch 0 -p1

  

  %build

  %py3_build
@@ -53,6 +56,9 @@ 

  

  

  %changelog

+ * Tue Sep 19 2023 Michael Vogt <michael.vogt@gmail.com> - 0.4.0-18

+ - Add patch to move from setuptools to distuils (rhbz#2220569)

+ 

  * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-17

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

  

file added
+12
@@ -0,0 +1,12 @@ 

+ diff --git a/setup.py b/setup.py

+ index eee738c..310a797 100644

+ --- a/setup.py

+ +++ b/setup.py

+ @@ -1,6 +1,6 @@

+  # -*- coding: utf-8 -*-

+  import sys

+ -from distutils.core import setup

+ +from setuptools import setup

+  

+  requires = ['pyyaml']

+  if float('%d.%d' % sys.version_info[:2]) < 2.7:

The setup.py is currently using distutils. However the
distutils package is removed in python3.12. The recommended
path seems to be to use setuptools. This commit adds a new
use-setuptools.patch that does exactly that. See also
the upstream PR:
https://github.com/fmenabe/python-yamlordereddictloader/pull/9

Also BuildRequires python3-setuptools now.

rebased onto d5dc9c1

7 months ago