From 442d1f972548aaf94f98b6982126feb6187386bb Mon Sep 17 00:00:00 2001 From: jpzhang187 Date: Wed, 11 Nov 2020 15:39:10 +0800 Subject: [PATCH] Drop python2 support --- python-twisted.spec | 64 ++++----------------------------------------- python-twisted.yaml | 4 +++ 2 files changed, 9 insertions(+), 59 deletions(-) create mode 100644 python-twisted.yaml diff --git a/python-twisted.spec b/python-twisted.spec index cdff3b5..3632a7c 100644 --- a/python-twisted.spec +++ b/python-twisted.spec @@ -1,6 +1,6 @@ Name: python-twisted Version: 18.9.0 -Release: 3 +Release: 4 Summary: An event-driven networking engine written in Python License: MIT URL: http://twistedmatrix.com/ @@ -28,44 +28,6 @@ IOCP (Windows), and various GUI event loops (GTK+2/3, Qt, wxWidgets). Third-party reactors can plug into Twisted, and provide support for additional event loops. -%package -n python2-twisted -Summary: An event-driven networking engine written in Python - -%{?python_provide:%python_provide python2-twisted} - -BuildRequires: python2-devel >= 2.6 python2dist(appdirs) >= 1.4.0 -BuildRequires: python2dist(automat) >= 0.3.0 python2dist(constantly) >= 15.1 -BuildRequires: python2dist(cryptography) >= 1.5 python2dist(incremental) >= 16.10.1 -BuildRequires: (python2dist(h2) >= 3.0 with python2dist(h2) < 4.0) -BuildRequires: python2dist(hyperlink) >= 17.1.1 python2dist(idna) >= 0.6 -BuildRequires: (python2dist(priority) >= 1.1.0 with python2dist(priority) < 2.0) -BuildRequires: python2dist(pyasn1) python2dist(pyopenssl) >= 16.0.0 -BuildRequires: python2dist(pyserial) >= 3.0 python2dist(service-identity) -BuildRequires: python2dist(setuptools) python2dist(zope.interface) >= 4.4.2 -BuildRequires: python2dist(pyhamcrest) - -Recommends: python2dist(service-identity) - -%description -n python2-twisted -Twisted is an event-based framework for internet applications, -supporting Python 2.7 and Python 3.5+. It includes modules for many -different purposes, including the following: - - * twisted.web: HTTP clients and servers, HTML templating, and a WSGI server - * twisted.conch: SSHv2 and Telnet clients and servers and terminal emulators - * twisted.words: Clients and servers for IRC, XMPP, and other IM protocols - * twisted.mail: IMAPv4, POP3, SMTP clients and servers - * twisted.positioning: Tools for communicating with NMEA-compatible GPS receivers - * twisted.names: DNS client and tools for making your own DNS servers - * twisted.trial: A unit testing framework that integrates well with Twisted-based code. - -Twisted supports all major system event loops -- select (all platforms), -poll (most POSIX platforms), epoll (Linux), kqueue (FreeBSD, macOS), -IOCP (Windows), and various GUI event loops (GTK+2/3, Qt, wxWidgets). -Third-party reactors can plug into Twisted, and provide support for -additional event loops. - - %package -n python3-twisted Summary: An event-driven networking engine written in Python @@ -73,7 +35,7 @@ Summary: An event-driven networking engine written in Python BuildRequires: python3-devel >= 3.3 python3dist(appdirs) >= 1.4.0 BuildRequires: python3dist(automat) >= 0.3.0 python3dist(constantly) >= 15.1 -BuildRequires: python3dist(cryptography) >= 1.5 python3dist(hyperlink) >= 17.1.1 +BuildRequires: python3dist(cryptography) >= 1.5 python3-hyperlink >= 17.1.1 BuildRequires: (python3dist(h2) >= 3.0 with python3dist(h2) < 4.0) BuildRequires: python3dist(idna) >= 0.6 python3dist(incremental) >= 16.10.1 BuildRequires: (python3dist(priority) >= 1.1.0 with python3dist(priority) < 2.0) @@ -114,7 +76,6 @@ The python-twisted-help package contains related documents. %autosetup -n Twisted-%{version} -p1 %build -%py2_build %py3_build PYTHONPATH=${PWD}/src/ sphinx-build-3 -a docs html @@ -122,16 +83,6 @@ rm -rf html/.doctrees rm -rf html/.buildinfo %install -%py2_install -mv %{buildroot}%{_bindir}/trial %{buildroot}%{_bindir}/trial-%{python2_version} -mv %{buildroot}%{_bindir}/twistd %{buildroot}%{_bindir}/twistd-%{python2_version} -ln -s ./trial-%{python2_version} %{buildroot}%{_bindir}/trial-2 -ln -s ./twistd-%{python2_version} %{buildroot}%{_bindir}/twistd-2 -chmod 755 %{buildroot}%{python2_sitearch}/twisted/python/_sendmsg.so -chmod 755 %{buildroot}%{python2_sitearch}/twisted/test/raiser.so -chmod +x %{buildroot}%{python2_sitearch}/twisted/mail/test/pop3testserver.py -chmod +x %{buildroot}%{python2_sitearch}/twisted/trial/test/scripttest.py - %py3_install mv %{buildroot}%{_bindir}/trial %{buildroot}%{_bindir}/trial-%{python3_version} mv %{buildroot}%{_bindir}/twistd %{buildroot}%{_bindir}/twistd-%{python3_version} @@ -142,7 +93,6 @@ ln -s ./twistd-%{python3_version} %{buildroot}%{_bindir}/twistd chmod +x %{buildroot}%{python3_sitearch}/twisted/mail/test/pop3testserver.py chmod +x %{buildroot}%{python3_sitearch}/twisted/trial/test/scripttest.py -pathfix.py -pn -i %{__python2} %{buildroot}%{python2_sitearch} pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitearch} install -d %{buildroot}%{_mandir}/man1/ cp -a docs/conch/man/*.1 %{buildroot}%{_mandir}/man1/ @@ -150,15 +100,8 @@ cp -a docs/core/man/*.1 %{buildroot}%{_mandir}/man1/ cp -a docs/mail/man/*.1 %{buildroot}%{_mandir}/man1/ %check -PATH=%{buildroot}%{_bindir}:$PATH PYTHONPATH=%{buildroot}%{python2_sitearch} %{buildroot}%{_bindir}/trial-2 twisted ||: PATH=%{buildroot}%{_bindir}:$PATH PYTHONPATH=%{buildroot}%{python3_sitearch} %{buildroot}%{_bindir}/trial-3 twisted ||: -%files -n python2-twisted -%doc CONTRIBUTING NEWS.rst README.rst LICENSE -%{_bindir}/{trial-2*,twistd-2*} -%{python2_sitearch}/twisted -%{python2_sitearch}/Twisted-%{version}-py?.?.egg-info - %files -n python3-twisted %doc CONTRIBUTING NEWS.rst README.rst html LICENSE %{_bindir}/{trial-3*,twistd-3*} @@ -170,5 +113,8 @@ PATH=%{buildroot}%{_bindir}:$PATH PYTHONPATH=%{buildroot}%{python3_sitearch} %{b %{_mandir}/man1/{cftp.1*,ckeygen.1*,conch.1*,mailmail.1*,pyhtmlizer.1*,tkconch.1*,trial.1*,twistd.1*} %changelog +* Mon Oct 12 2020 zhangjiapeng - 18.9.0-4 +- Drop python2 support + * Tue Feb 25 2020 Jiangping Hu - 18.9.0-3 - Package init diff --git a/python-twisted.yaml b/python-twisted.yaml new file mode 100644 index 0000000..2b77300 --- /dev/null +++ b/python-twisted.yaml @@ -0,0 +1,4 @@ +version_control: pypi +src_repo: Twisted +tag_prefix: "^" +separator: "." -- Gitee