From 7e0e80d2021f687d8c96e8f6c482ab581391f006 Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 24 2021 16:37:20 +0000 Subject: Convert to Python 3 --- diff --git a/centpkg.spec b/centpkg.spec index 56e0d79..e1ccbc9 100644 --- a/centpkg.spec +++ b/centpkg.spec @@ -1,5 +1,3 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} - Name: centpkg Version: 0.4.6 Release: 1%{?dist} @@ -7,22 +5,11 @@ Summary: CentOS utility for working with dist-git License: GPLv2+ URL: https://git.centos.org/summary/centpkg.git Source0: centpkg-%{version}.tar.gz +BuildArch: noarch -# CentOS Distributed Packages -Requires: redhat-rpm-config -Requires: python-pycurl - -# EPEL Distributed Packages -Requires: pyrpkg >= 1.17 -Requires: koji - -BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: %{py3_dist setuptools} -# CentOS Distributed build-requires -BuildRequires: python-devel, python-setuptools - -# EPEL Distributed build-requires -BuildRequires: pyrpkg %description Provides the centpkg command for working with dist-git @@ -32,17 +19,19 @@ Provides the centpkg command for working with dist-git %build -%{__python} setup.py build +%py3_build + %install -%{__python} setup.py install -O1 --skip-build --root %{buildroot} +%py3_install %files %doc README.md COPYING %config %{_sysconfdir}/rpkg/centpkg.conf %{_bindir}/%{name} -%{python_sitelib}/* +%{python3_sitelib}/%{name} +%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info %changelog