python-twisted/python-twisted.spec

139 lines
5.8 KiB
RPMSpec
Raw Normal View History

2022-08-04 04:48:36 +00:00
%define debug_package %{nil}
2020-02-28 14:10:54 +08:00
Name: python-twisted
2022-12-07 16:38:23 +08:00
Version: 22.10.0
2023-12-29 15:52:56 +08:00
Release: 3
2020-02-28 14:10:54 +08:00
Summary: An event-driven networking engine written in Python
License: MIT
URL: http://twistedmatrix.com/
2022-08-04 04:48:36 +00:00
Source0: https://github.com/twisted/twisted/archive/twisted-%{version}/twisted-%{version}.tar.gz
2023-12-29 15:52:56 +08:00
# https://github.com/twisted/twisted/commit/1e6e9d23cac59689760558dcb6634285e694b04c
Patch0: CVE-2023-46137.patch
2020-02-28 14:10:54 +08:00
%description
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
%{?python_provide:%python_provide python3-twisted}
BuildRequires: python3-devel >= 3.3 python3dist(appdirs) >= 1.4.0
BuildRequires: python3dist(automat) >= 0.3.0 python3dist(constantly) >= 15.1
2020-11-11 15:39:10 +08:00
BuildRequires: python3dist(cryptography) >= 1.5 python3-hyperlink >= 17.1.1
BuildRequires: (python3dist(h2) >= 3.0 with python3dist(h2) < 5.0)
2020-02-28 14:10:54 +08:00
BuildRequires: python3dist(idna) >= 0.6 python3dist(incremental) >= 16.10.1
BuildRequires: (python3dist(priority) >= 1.1.0 with python3dist(priority) < 2.0)
BuildRequires: python3dist(pyasn1) python3dist(pyopenssl) >= 16.0.0
BuildRequires: python3dist(pyserial) >= 3.0 python3dist(service-identity)
BuildRequires: python3dist(setuptools) python3dist(sphinx) >= 1.3.1
BuildRequires: python3dist(zope.interface) >= 4.4.2 python3dist(pyhamcrest)
Recommends: python3dist(service-identity)
%description -n python3-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 help
Summary: Documents for python-twisted
BuildArch: noarch
%description help
The python-twisted-help package contains related documents.
%prep
2022-08-04 04:48:36 +00:00
%autosetup -n twisted-twisted-%{version} -p1
2020-02-28 14:10:54 +08:00
%build
%py3_build
%install
%py3_install
mv %{buildroot}%{_bindir}/trial %{buildroot}%{_bindir}/trial-%{python3_version}
mv %{buildroot}%{_bindir}/twistd %{buildroot}%{_bindir}/twistd-%{python3_version}
ln -s ./trial-%{python3_version} %{buildroot}%{_bindir}/trial-3
ln -s ./twistd-%{python3_version} %{buildroot}%{_bindir}/twistd-3
ln -s ./trial-%{python3_version} %{buildroot}%{_bindir}/trial
ln -s ./twistd-%{python3_version} %{buildroot}%{_bindir}/twistd
2022-08-04 04:48:36 +00:00
chmod +x %{buildroot}%{python3_sitelib}/twisted/mail/test/pop3testserver.py
chmod +x %{buildroot}%{python3_sitelib}/twisted/trial/test/scripttest.py
2020-02-28 14:10:54 +08:00
2022-08-04 04:48:36 +00:00
pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
2020-02-28 14:10:54 +08:00
install -d %{buildroot}%{_mandir}/man1/
cp -a docs/conch/man/*.1 %{buildroot}%{_mandir}/man1/
cp -a docs/core/man/*.1 %{buildroot}%{_mandir}/man1/
cp -a docs/mail/man/*.1 %{buildroot}%{_mandir}/man1/
%check
2022-08-04 04:48:36 +00:00
PATH=%{buildroot}%{_bindir}:$PATH PYTHONPATH=%{buildroot}%{python3_sitelib} %{buildroot}%{_bindir}/trial-3 twisted ||:
2020-02-28 14:10:54 +08:00
%files -n python3-twisted
2022-08-04 04:48:36 +00:00
%doc NEWS.rst README.rst LICENSE
2020-02-28 14:10:54 +08:00
%{_bindir}/{trial-3*,twistd-3*}
2022-08-04 04:48:36 +00:00
%{python3_sitelib}/twisted
%{python3_sitelib}/Twisted-%{version}-py%{python3_version}.egg-info
2020-02-28 14:10:54 +08:00
%{_bindir}/{cftp,ckeygen,conch,mailmail,pyhtmlizer,tkconch,trial,twist,twistd}
%files help
%{_mandir}/man1/{cftp.1*,ckeygen.1*,conch.1*,mailmail.1*,pyhtmlizer.1*,tkconch.1*,trial.1*,twistd.1*}
%changelog
2023-12-29 15:52:56 +08:00
* Fri Dec 29 2023 yaoxin <yao_xin001@hoperun.com> - 22.10.0-3
- Fix CVE-2023-46137
* Thu Jan 19 2023 caodongxia <caodongxia@h-partners.com> - 22.10.0-2
- Modify the version restriction of python-h2
2022-12-07 16:38:23 +08:00
* Wed Dec 07 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 22.10.0-1
- Update package to version 22.10.0
2022-08-04 04:48:36 +00:00
* Wed Aug 03 2022 duyiwei <duyiwei@kylinos.cn> - 22.4.0-1
- upgrade version to 22.4.0
* Mon May 09 2022 xu_ping <xuping33@h-partners.com> - 18.9.0-7
- fix build error caused by python3.10 wildcard
2021-08-17 14:01:16 +08:00
* Tue Aug 17 2021 liwu <liwu13@huawei.com> - 18.9.0-6
- fix CVE-2019-12855
2021-08-16 14:11:25 +08:00
* Mon Aug 16 2021 liwu <liwu13@huawei.com> - 18.9.0-5
- fix CVE-2020-10109 CVE-2020-10108
2020-11-11 15:39:10 +08:00
* Mon Oct 12 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 18.9.0-4
- Drop python2 support
2020-02-28 14:10:54 +08:00
* Tue Feb 25 2020 Jiangping Hu <hujp1985@foxmail.com> - 18.9.0-3
- Package init