From b81a8931cf7acbac61d1f40b2b3a1f0a20681a45 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 31 Jan 2018 15:58:51 -0700 Subject: [PATCH] Support python3 on EPEL --- pyscard.spec | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pyscard.spec b/pyscard.spec index 3e621ce..7d5c749 100644 --- a/pyscard.spec +++ b/pyscard.spec @@ -1,6 +1,6 @@ Name: pyscard Version: 1.9.5 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A framework for building smart card aware applications in Python Group: Development/Libraries @@ -15,7 +15,7 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar. BuildRequires: gcc BuildRequires: python2-devel -BuildRequires: python3-devel +BuildRequires: python%{python3_pkgversion}-devel BuildRequires: pcsc-lite-devel BuildRequires: swig >= 1.3.31 @@ -39,11 +39,11 @@ Obsoletes: pyscard < %{version}-%{release} %description -n python2-%{name} %_description -%package -n python3-%{name} +%package -n python%{python3_pkgversion}-%{name} Summary: A framework for building smart card aware applications in Python Requires: pcsc-lite -%description -n python3-%{name} +%description -n python%{python3_pkgversion}-%{name} The pyscard smartcard library is a framework for building smart card aware applications in Python. The smartcard module is built on top of the PCSC API Python wrapper module. @@ -56,13 +56,13 @@ This is the python3 package. #sed -i 's/\r//' LICENSE %build -%{__python2} setup.py build -%{__python3} setup.py build +%py2_build +%py3_build %install -%{__python2} setup.py install --root %{buildroot} +%py2_install chmod 755 %{buildroot}%{python2_sitearch}/smartcard/scard/*.so -%{__python3} setup.py install --root %{buildroot} +%py3_install chmod 755 %{buildroot}%{python3_sitearch}/smartcard/scard/*.so %files -n python2-%{name} @@ -72,7 +72,7 @@ chmod 755 %{buildroot}%{python3_sitearch}/smartcard/scard/*.so %{python2_sitearch}/smartcard/ %{python2_sitearch}/%{name}-%{version}-py*.egg-info -%files -n python3-%{name} +%files -n python%{python3_pkgversion}-%{name} %license LICENSE %doc README %doc smartcard/doc/* @@ -80,6 +80,9 @@ chmod 755 %{buildroot}%{python3_sitearch}/smartcard/scard/*.so %{python3_sitearch}/%{name}-%{version}-py*.egg-info %changelog +* Fri Nov 16 2018 Orion Poplawski - 1.9.5-10 +- Support python3 on EPEL + * Fri Jul 13 2018 Fedora Release Engineering - 1.9.5-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild