[packages/python3-pycurl] rename and drop python2 stuff

atler atler at pld-linux.org
Sat Mar 15 03:02:46 CET 2025


commit b216de7001cb7ff5afa2dc9e0ba61523c0e50c10
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat Mar 15 01:09:39 2025 +0100

    rename and drop python2 stuff
    
    project appears to be python3 only for a while now. possibly last
    python2 compatible version was 7.43.0.5 released in 2020.

 python-pycurl.spec => python3-pycurl.spec | 69 ++-----------------------------
 1 file changed, 4 insertions(+), 65 deletions(-)
---
diff --git a/python-pycurl.spec b/python3-pycurl.spec
similarity index 64%
rename from python-pycurl.spec
rename to python3-pycurl.spec
index 4ef4099..b71468a 100644
--- a/python-pycurl.spec
+++ b/python3-pycurl.spec
@@ -1,32 +1,21 @@
-#
-# Conditional build:
-%bcond_without  python2 # Python 2.x module
-%bcond_without  python3 # Python 3.x module
 
 %define		module	pycurl
 Summary:	Free and easy-to-use client-side URL transfer library
 Summary(pl.UTF-8):	Łatwa w użyciu biblioteka obsługi URL od strony klienta
-Name:		python-%{module}
+Name:		python3-%{module}
 Version:	7.45.3
 Release:	3
 License:	LGPL v2 or MIT-like
 Group:		Libraries/Python
 Source0:	https://files.pythonhosted.org/packages/source/p/pycurl/%{module}-%{version}.tar.gz
 # Source0-md5:	c72d307325e8e4a95276af589957aa36
-Patch0:		%{name}-no-static-libs.patch
+Patch0:		python-pycurl-no-static-libs.patch
 URL:		http://pycurl.io/
 BuildRequires:	curl-devel >= 7.19
 BuildRequires:	pkgconfig >= 1:0.20
-%if %{with python2}
-BuildRequires:	python >= 1:2.7
-BuildRequires:	python-devel >= 1:2.7
-BuildRequires:	python-modules >= 1:2.7
-%endif
-%if %{with python3}
 BuildRequires:	python3 >= 1:3.5
 BuildRequires:	python3-devel >= 1:3.4
 BuildRequires:	python3-modules >= 1:3.4
-%endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 # During its initialization, PycURL checks that the actual libcurl version
@@ -35,7 +24,7 @@ BuildRequires:	rpmbuild(macros) >= 1.714
 # automatically reflected by rpm).
 # For now, we have to reflect that dependency.
 %requires_ge curl-libs
-Requires:	python-libs >= 1:2.7
+Requires:	python3-libs >= 1:3.5
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -55,30 +44,6 @@ POST, HTTP PUT, uploady FTP, kerberos, upload plików przez HTTP oparty
 na formularzach, proxy, ciasteczka, uwierzytelnienie, wznawianie
 przesyłania plików, tunelowanie proxy i wiele innych.
 
-%package -n python3-pycurl
-Summary:	Free and easy-to-use client-side URL transfer library
-Summary(pl.UTF-8):	Łatwa w użyciu biblioteka obsługi URL od strony klienta
-Group:		Libraries/Python
-Requires:	python3-libs >= 1:3.5
-%requires_ge curl-libs
-
-%description -n python3-pycurl
-pycurl is Python interface to curl library - free and easy-to-use
-client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS,
-GOPHER, TELNET, DICT, FILE and LDAP. libcurl supports HTTPS
-certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form
-based upload, proxies, cookies, user+password authentication, file
-transfer resume, HTTP proxy tunneling and more!
-
-%description -n python3-pycurl -l pl.UTF-8
-pycurl jest interfejsem języka Python do biblioteki libcurl -
-wolnodostępnej i łatwej w użyciu biblioteki operacji na URL-ach od
-strony klienta, obsługującej FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET,
-DICT, FILE i LDAP. libcurl obsługuje także certyfikaty HTTPS, HTTP
-POST, HTTP PUT, uploady FTP, kerberos, upload plików przez HTTP oparty
-na formularzach, proxy, ciasteczka, uwierzytelnienie, wznawianie
-przesyłania plików, tunelowanie proxy i wiele innych.
-
 %package doc
 Summary:	Documentation for pycurl Python module
 Summary(pl.UTF-8):	Dokumentacja do modułu Pythona pycurl
@@ -108,29 +73,14 @@ Moduł zawierający przykładowe programy do modułu Pythona pycurl.
 %patch -P 0 -p1
 
 %build
-%if %{with python2}
-%py_build \
-	--debug
-%endif
-
-%if %{with python3}
 %py3_build \
 	--debug
-%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{py_sitedir},%{_examplesdir}/%{name}-%{version}}
 
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
 %py3_install
-%endif
 
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/pycurl
@@ -138,26 +88,15 @@ cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS COPYING-MIT ChangeLog README.rst RELEASE-NOTES.rst
-%attr(755,root,root) %{py_sitedir}/pycurl.so
-%dir %{py_sitedir}/curl
-%{py_sitedir}/curl/*.py[co]
-%{py_sitedir}/pycurl-*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-pycurl
-%defattr(644,root,root,755)
-%doc AUTHORS COPYING-MIT ChangeLog README.rst RELEASE-NOTES.rst
 %attr(755,root,root) %{py3_sitedir}/pycurl*.so
 %dir %{py3_sitedir}/curl
 %{py3_sitedir}/curl/__pycache__
 %{py3_sitedir}/curl/*.py
 %{py3_sitedir}/pycurl-*.egg-info
-%endif
 
 %files doc
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pycurl.git/commitdiff/0ed291a108ee1adaa137f677ebdb08942988fd77



More information about the pld-cvs-commit mailing list