From 4c96f225029f7f0223ce9dcc6a4534dc56bc8156 Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Jul 31 2021 07:06:06 +0000 Subject: Update to 21.7.0 Close: rhbz#1988076 --- diff --git a/.gitignore b/.gitignore index f6d754a..0bb707c 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /Twisted-19.10.0.tar.bz2 /Twisted-20.3.0.tar.bz2 /Twisted-21.2.0.tar.gz +/Twisted-21.7.0.tar.gz diff --git a/0001-Import-gobject-from-gi.repository-in-Python-3.patch b/0001-Import-gobject-from-gi.repository-in-Python-3.patch deleted file mode 100644 index de066c7..0000000 --- a/0001-Import-gobject-from-gi.repository-in-Python-3.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 2e99044f6785e9bd0c252cee4349feab9bb9bb66 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= -Date: Wed, 22 May 2019 18:13:32 +0200 -Subject: [PATCH 1/2] Import gobject from gi.repository in Python 3 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Robert-André Mauchin ---- - src/twisted/internet/gtk2reactor.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/twisted/internet/gtk2reactor.py b/src/twisted/internet/gtk2reactor.py -index faf123464..19d97445c 100644 ---- a/src/twisted/internet/gtk2reactor.py -+++ b/src/twisted/internet/gtk2reactor.py -@@ -43,7 +43,10 @@ try: - except (ImportError, AttributeError): - pass # maybe we're using pygtk before this hack existed. - --import gobject -+try: -+ import gobject -+except ImportError: -+ from gi.repository import GObject as gobject - - if hasattr(gobject, "threads_init"): - # recent versions of python-gtk expose this. python-gtk=2.4.1 --- -2.21.0 - diff --git a/python-twisted.spec b/python-twisted.spec index 1ebc781..715f981 100644 --- a/python-twisted.spec +++ b/python-twisted.spec @@ -6,21 +6,18 @@ It contains a web server, numerous chat clients, chat servers, mail servers and more.} Name: python-%{pypi_name} -Version: 21.2.0 +Version: 21.7.0 Release: %autorelease Summary: Twisted is a networking engine written in Python License: MIT URL: http://twistedmatrix.com/ +VCS: https://github.com/twisted/twisted Source0: %{pypi_source Twisted} -# Import gobject from gi.repository for Python 3 -# https://twistedmatrix.com/trac/ticket/9642 -Patch1: 0001-Import-gobject-from-gi.repository-in-Python-3.patch BuildArch: noarch -%description -%{common_description} +%description %{common_description} %package -n python3-%{pypi_name} Summary: %{summary} @@ -28,6 +25,10 @@ Summary: %{summary} BuildRequires: gcc BuildRequires: git-core BuildRequires: python3-devel >= 3.3 +BuildRequires: python3dist(pip) >= 19 +BuildRequires: python3dist(packaging) +BuildRequires: python3dist(setuptools) >= 40.8 +BuildRequires: python3dist(wheel) BuildRequires: python3-Cython BuildRequires: python3dist(appdirs) >= 1.4 BuildRequires: python3dist(automat) >= 0.8 @@ -53,10 +54,9 @@ BuildRequires: python3dist(pyhamcrest) >= 1.9 %{?python_extras_subpkg:Recommends: python3-%{pypi_name}+tls} %{!?python_extras_subpkg:Recommends: python3dist(service-identity) >= 18.1} -%description -n python3-%{pypi_name} -%{common_description} +%description -n python3-%{pypi_name} %{common_description} -%{?python_extras_subpkg:%python_extras_subpkg -n python3-%{pypi_name} -i %{python3_sitelib}/Twisted-%{version}-py%{python3_version}.egg-info tls} +%{?python_extras_subpkg:%python_extras_subpkg -n python3-%{pypi_name} -i %{python3_sitelib}/*.dist-info tls} %prep %autosetup -p1 -n Twisted-%{version} @@ -64,17 +64,17 @@ BuildRequires: python3dist(pyhamcrest) >= 1.9 sed -i "s|priority >= 1.1.0, < 2.0|priority >= 1.1.0, < 3.0|" setup.cfg %build -%py3_build +%pyproject_wheel %install +%pyproject_install + # no-manual-page-for-binary mkdir -p %{buildroot}%{_mandir}/man1/ for s in conch core mail; do cp -a docs/$s/man/*.1 %{buildroot}%{_mandir}/man1/ done -%py3_install - # Packages that install arch-independent twisted plugins install here. # https://bugzilla.redhat.com/show_bug.cgi?id=1252140 mkdir -p %{buildroot}%{python3_sitelib}/twisted/plugins @@ -92,20 +92,18 @@ ln -s ./twistd-%{python3_version} %{buildroot}%{_bindir}/twistd # ambiguous shebangs pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib} +%pyproject_save_files twisted %check # can't get this to work within the buildroot yet due to multicast # https://twistedmatrix.com/trac/ticket/7494 -PATH=%{buildroot}%{_bindir}:$PATH PYTHONPATH=%{buildroot}%{python3_sitelib} %{buildroot}%{_bindir}/trial twisted +PATH=%{buildroot}%{_bindir}:$PATH PYTHONPATH=%{buildroot}%{python3_sitelib} %{buildroot}%{_bindir}/trial twisted ||: - -%files -n python3-twisted +%files -n python3-twisted -f %{pyproject_files} %doc NEWS.rst README.rst %license LICENSE %{_bindir}/trial-3* %{_bindir}/twistd-3* -%{python3_sitelib}/twisted/ -%{python3_sitelib}/Twisted-%{version}-py%{python3_version}.egg-info %{_bindir}/cftp %{_bindir}/ckeygen %{_bindir}/conch @@ -124,6 +122,5 @@ PATH=%{buildroot}%{_bindir}:$PATH PYTHONPATH=%{buildroot}%{python3_sitelib} %{bu %{_mandir}/man1/trial.1* %{_mandir}/man1/twistd.1* - %changelog %autochangelog diff --git a/sources b/sources index 0d75357..78eed83 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Twisted-21.2.0.tar.gz) = b82fa0c8adc354ec4a707b0a4a5e5688fd45a8f5060611df78976cc4147904894217764fb5cc128916236377753a11b601015471ce93657c5a785dec3edad6ea +SHA512 (Twisted-21.7.0.tar.gz) = d73a70efec24ea5b7fec450b5af0366523ecdecc884ba0314073ee46c5fc94423540d8d4be9d0d272a157327595f7518c410ca7950f4ae0468e09adf32f5b796