From a7d16478ba5257652c9cf11a0f41dbfc1ff07d87 Mon Sep 17 00:00:00 2001 From: tigro Date: Wed, 7 Feb 2024 21:13:41 +0300 Subject: [PATCH] import python-zope-event-4.5.0-1.el9.1 --- .gitignore | 2 +- .python-zope-event.metadata | 2 +- SOURCES/python-zope-event-python3.patch | 19 +++ SOURCES/python-zope-event-tox.patch | 105 +++++++++++++++ SPECS/python-zope-event.spec | 172 ++++++++++++++---------- 5 files changed, 230 insertions(+), 70 deletions(-) create mode 100644 SOURCES/python-zope-event-python3.patch create mode 100644 SOURCES/python-zope-event-tox.patch diff --git a/.gitignore b/.gitignore index 9138753..d57dcbe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/zope.event-4.2.0.tar.gz +SOURCES/zope.event-4.5.0.tar.gz diff --git a/.python-zope-event.metadata b/.python-zope-event.metadata index f482901..1be9ecf 100644 --- a/.python-zope-event.metadata +++ b/.python-zope-event.metadata @@ -1 +1 @@ -0ee288bac481d736ad3d4a68ef23092a981cb55f SOURCES/zope.event-4.2.0.tar.gz +32ac2c3f2c4c9bb6f4d7bccbb5dbd6f22964d6ad SOURCES/zope.event-4.5.0.tar.gz diff --git a/SOURCES/python-zope-event-python3.patch b/SOURCES/python-zope-event-python3.patch new file mode 100644 index 0000000..eda1d4d --- /dev/null +++ b/SOURCES/python-zope-event-python3.patch @@ -0,0 +1,19 @@ +--- a/docs/usage.rst 2020-09-18 04:19:44.000000000 -0600 ++++ b/docs/usage.rst 2021-09-08 13:59:51.394111583 -0600 +@@ -86,14 +86,14 @@ added to the subscriptions list: + .. doctest:: + + >>> def f(event): +- ... print 'got:', event ++ ... print('got:', event) + >>> zope.event.subscribers.append(f) + + >>> zope.event.notify(42) + got: 42 + + >>> def g(event): +- ... print 'also got:', event ++ ... print('also got:', event) + + >>> zope.event.subscribers.append(g) + diff --git a/SOURCES/python-zope-event-tox.patch b/SOURCES/python-zope-event-tox.patch new file mode 100644 index 0000000..73773b1 --- /dev/null +++ b/SOURCES/python-zope-event-tox.patch @@ -0,0 +1,105 @@ +--- a/tox.ini 2020-09-18 04:19:44.000000000 -0600 ++++ b/tox.ini 2021-09-08 13:50:00.480290094 -0600 +@@ -1,36 +1,81 @@ ++# Generated from: ++# https://github.com/zopefoundation/meta/tree/master/config/pure-python + [tox] ++minversion = 3.18 + envlist = +-# Jython 2.7b1 support pending fix for Jython incompat. w/ pip's vendored-in +-# requests -> html5 libraries. See +-# https://github.com/html5lib/html5lib-python/pull/150 +-# py27,py33,py34,pypy,pypy3,jython,coverage,docs +- py27,py35,py36,py37,py38,py39,pypy,pypy3,coverage,docs ++ lint ++ py27 ++ py35 ++ py36 ++ py37 ++ py38 ++ py39 ++ pypy ++ pypy3 ++ docs ++ coverage + + [testenv] +-commands = +- coverage run -m zope.testrunner --test-path=src [] ++usedevelop = true + deps = +- .[test] +- coverage +-setenv = +- COVERAGE_FILE=.coverage.{envname} ++ Sphinx ++commands = ++ zope-testrunner --test-path=src {posargs:-vc} ++ !py27-!pypy: sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest ++extras = ++ test + +-[testenv:coverage] +-setenv = +- COVERAGE_FILE=.coverage ++[testenv:lint] ++basepython = python3 + skip_install = true ++deps = ++ flake8 ++ check-manifest ++ check-python-versions + commands = +- coverage erase +- coverage combine +- coverage report +- coverage html +- coverage xml ++ flake8 src setup.py ++ check-manifest ++ check-python-versions + + [testenv:docs] +-basepython = +- python2.7 ++basepython = python3 ++skip_install = false ++deps = Sphinx ++commands_pre = + commands = + sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html + sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest ++ ++[testenv:coverage] ++basepython = python3 ++allowlist_externals = ++ mkdir + deps = ++ coverage ++ coverage-python-version + Sphinx ++commands = ++ mkdir -p {toxinidir}/parts/htmlcov ++ coverage run -m zope.testrunner --test-path=src {posargs:-vc} ++ coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest ++ coverage html ++ coverage report -m --fail-under=100 ++ ++[coverage:run] ++branch = True ++plugins = coverage_python_version ++source = zope.event ++ ++[coverage:report] ++precision = 2 ++exclude_lines = ++ pragma: no cover ++ pragma: nocover ++ except ImportError: ++ raise NotImplementedError ++ if __name__ == '__main__': ++ self.fail ++ raise AssertionError ++ ++[coverage:html] ++directory = parts/htmlcov diff --git a/SPECS/python-zope-event.spec b/SPECS/python-zope-event.spec index 37a985e..ba0cec7 100644 --- a/SPECS/python-zope-event.spec +++ b/SPECS/python-zope-event.spec @@ -1,52 +1,45 @@ -%if 0%{?fedora} || 0%{?rhel} > 7 -%global with_python3 1 -%endif +# Running the tests requires python3-zope-testrunner, which requires +# python3-zope-interface, which requires this package. Build in bootstrap +# mode to avoid the circular dependency. +%bcond_without bootstrap +%bcond_with docs + +# Install doc subpackage files into the main package doc directory +%global _docdir_fmt %{name} Name: python-zope-event -Version: 4.2.0 -Release: 12%{?dist} +Version: 4.5.0 +Release: 1%{?dist}.1 Summary: Zope Event Publication License: ZPLv2.1 -URL: http://pypi.python.org/pypi/zope.event/ -Source0: http://pypi.python.org/packages/source/z/zope.event/zope.event-%{version}.tar.gz +URL: https://pypi.python.org/pypi/zope.event/ +Source0: %pypi_source zope.event BuildArch: noarch -%description -The zope.event package provides a simple event system. It provides -an event publishing system and a very simple event-dispatching system -on which more sophisticated event dispatching systems can be built. -(For example, a type-based event dispatching system that builds on -zope.event can be found in zope.component.) - -%package -n python2-zope-event -Summary: Zope Event Publication (Python 2) -%{?python_provide:%python_provide python2-zope-event} +# Update tox.ini, fixes Fedora build failure. Part of this commit: +# https://github.com/zopefoundation/zope.event/commit/3905db445a7e15f32e62da1fea4d0b4526d40762 +Patch0: %{name}-tox.patch -BuildRequires: python2-devel -BuildRequires: python2-setuptools +# Make the tests pass with python 3. Part of this commit: +# https://github.com/zopefoundation/zope.event/commit/5dd13f35725388c861daaea4fe39c2c1e9976026 +Patch1: %{name}-python3.patch -Requires: python2 - -%description -n python2-zope-event +%description The zope.event package provides a simple event system. It provides an event publishing system and a very simple event-dispatching system on which more sophisticated event dispatching systems can be built. (For example, a type-based event dispatching system that builds on zope.event can be found in zope.component.) -This package contains the version for Python 2. - -%if 0%{?with_python3} %package -n python3-zope-event Summary: Zope Event Publication (Python 3) -%{?python_provide:%python_provide python3-zope-event} +BuildRequires: make BuildRequires: python3-devel -BuildRequires: python3-setuptools - -BuildRequires: python3-sphinx - -Requires: python3 +%if %{with docs} +BuildRequires: python3-docs +BuildRequires: %{py3_dist sphinx} +%endif %description -n python3-zope-event The zope.event package provides a simple event system. It provides @@ -56,65 +49,108 @@ on which more sophisticated event dispatching systems can be built. zope.event can be found in zope.component.) This package contains the version for Python 3. -%endif + +%package doc +Summary: Documentation for zope.event + +%description doc +Documentation for %{name}. %prep -%setup -q -n zope.event-%{version} -rm -rf %{modname}.egg-info +%autosetup -n zope.event-%{version} -p1 -%build -%py2_build -%if 0%{?with_python3} -%py3_build +# Update the sphinx theme name +sed -i "s/'default'/'classic'/" docs/conf.py + +# Use local objects.inv for intersphinx +sed -i "s|\('https://docs\.python\.org/': \)None|\1'%{_docdir}/python3-docs/html/objects.inv'|" docs/conf.py + +%generate_buildrequires +%if %{with bootstrap} +%pyproject_buildrequires +%else +%pyproject_buildrequires -t %endif -# build the sphinx documents -pushd docs -PYTHONPATH=../src make SPHINXBUILD=sphinx-build-3 html -rm -f _build/html/.buildinfo -popd +%build +%pyproject_wheel +%if %{with docs} +# build the sphinx documents +PYTHONPATH=$PWD/src make -C docs html +rm -f docs/_build/html/.buildinfo +%endif %install -%if 0%{?with_python3} -%py3_install -%endif -%py2_install +%pyproject_install +%if %{without bootstrap} %check -%{__python2} setup.py test -%if 0%{?with_python3} -%{__python3} setup.py test +%tox %endif -%files -n python2-zope-event -%doc CHANGES.rst COPYRIGHT.txt README.rst -%doc docs/_build/html/ -%license LICENSE.txt -%{python2_sitelib}/zope/event/ -%exclude %{python2_sitelib}/zope/event/tests.py* -%dir %{python2_sitelib}/zope/ -#%{python2_sitelib}/zope/__init__* -%{python2_sitelib}/zope.event-*.egg-info -%{python2_sitelib}/zope.event-*-nspkg.pth - -%if 0%{?with_python3} %files -n python3-zope-event -%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst -%doc docs/_build/html/ +%doc CHANGES.rst COPYRIGHT.txt README.rst %license LICENSE.txt %{python3_sitelib}/zope/event/ %exclude %{python3_sitelib}/zope/event/tests.py* %exclude %{python3_sitelib}/zope/event/__pycache__/tests* %dir %{python3_sitelib}/zope/ -#%{python3_sitelib}/zope/__init__* -%{python3_sitelib}/zope.event-*.egg-info +%{python3_sitelib}/zope.event-*.dist-info %{python3_sitelib}/zope.event-*-nspkg.pth + +%files doc +%if %{with docs} +%doc docs/_build/html/ %endif %changelog -* Wed Jan 24 2024 Sergey Cherevko - 4.2.0-12 -- Rebuilt for MSVSphere 8.9 +* Wed Feb 07 2024 Arkady L. Shane - 4.5.0-1R.1 +- Rebuilt for MSVSphere 9.2 + +* Thu Apr 21 2022 Orion Poplawski - 4.5.0-1.1 +- Drop docs for EPEL9 + +* Fri Mar 4 2022 Jerry James - 4.5.0-1 +- Version 4.5.0 (bz 1475058) +- Add bootstrap conditional to break circular dependency when testing +- Add doc subpackage to hold Sphinx-built documentation +- Add tox and python3 patches to fix build and test failures +- Modernize the spec file + +* Fri Jan 21 2022 Fedora Release Engineering - 4.2.0-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 4.2.0-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jun 03 2021 Python Maint - 4.2.0-21 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 4.2.0-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 4.2.0-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat May 23 2020 Miro Hrončok - 4.2.0-18 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 4.2.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 31 2019 Miro Hrončok - 4.2.0-16 +- Subpackage python2-zope-event has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Thu Oct 03 2019 Miro Hrončok - 4.2.0-15 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Fri Aug 16 2019 Miro Hrončok - 4.2.0-14 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 4.2.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 4.2.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild