#1 add python3 packaging support
Opened 6 years ago by ttorling. Modified 6 years ago
rpms/ ttorling/python-schedutils master  into  rawhide

add python3 packaging support
Tim Orling • 6 years ago  
file modified
+24 -3
@@ -4,12 +4,12 @@ 

  Summary: Linux scheduler python bindings

  Name: python-schedutils

  Version: 0.5

- Release: 5%{?dist}

+ Release: 6%{?dist}

  License: GPLv2

  URL: https://rt.wiki.kernel.org/index.php/Tuna

  Source: https://cdn.kernel.org/pub/software/libs/python/%{name}/%{name}-%{version}.tar.xz

  Group: System Environment/Libraries

- BuildRequires: python-devel

+ BuildRequires: python2-devel python3-devel

  BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

  

  %global _description\
@@ -24,11 +24,19 @@ 

  

  %description -n python2-schedutils %_description

  

+ %package -n python3-schedutils

+ Summary: %summary

+ %{?python_provide:%python_provide python3-schedutils}

+ 

+ %description -n python3-schedutils %_description

+ 

  %prep

  %setup -q

  

  %build

- %{__python} setup.py build

+ #%{__python} setup.py build

+ %py2_build

+ %py3_build

  

  %install

  rm -rf %{buildroot}
@@ -50,7 +58,20 @@ 

  %{python_sitearch}/*.egg-info

  %endif

  

+ %files -n python3-schedutils

+ %defattr(-,root,root)

+ %doc COPYING

+ %{_bindir}/pchrt

+ %{_bindir}/ptaskset

+ %{python_sitearch}/schedutils.so

+ %if "%{python_ver}" >= "2.5"

+ %{python_sitearch}/*.egg-info

+ %endif

+ 

  %changelog

+ * Fri Oct 06 2017 Tim Orling <ticotimo@gmail.com> - 0.5-6

+ - Enable python3 packaging

+ 

  * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5-5

  - Python 2 binary package renamed to python2-schedutils

    See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

I am sorry but the source code of schedutils is not Python 3 compatible so we cannot package it with Python 3. As you can see in the build log build of schedutils are full of warnings https://kojipkgs.fedoraproject.org//work/tasks/3388/22963388/build.log

Moreover, there are also issues in specfile. I think it doesn't make sense to list them. Please take a look here: https://python-rpm-porting.readthedocs.io/en/latest/

Metadata