diff --git a/.gitignore b/.gitignore index 5029c7d..a23a502 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/zope.interface-4.6.0.tar.gz +SOURCES/zope.interface-5.4.0.tar.gz diff --git a/.python-zope-interface.metadata b/.python-zope-interface.metadata index d87f9e3..78e5770 100644 --- a/.python-zope-interface.metadata +++ b/.python-zope-interface.metadata @@ -1 +1 @@ -e4dd98256b168e7888abbf6798789c775f5eae35 SOURCES/zope.interface-4.6.0.tar.gz +575ecb0dd1faae2294b8e2ec7b5ccb22006c4ccc SOURCES/zope.interface-5.4.0.tar.gz diff --git a/SPECS/python-zope-interface.spec b/SPECS/python-zope-interface.spec index e04eeec..9467f39 100644 --- a/SPECS/python-zope-interface.spec +++ b/SPECS/python-zope-interface.spec @@ -1,20 +1,11 @@ -%if 0%{?rhel} && 0%{?rhel} <= 6 -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%endif - -# Filter private shared library provides -%filter_provides_in %{python2_sitearch}/zope/interface/.*\.so$ -%filter_setup +%bcond_with docs -%if 0%{?fedora} || 0%{?rhel} > 7 -%global with_python3 1 -%endif +# Install doc subpackage files into the main package doc directory +%global _docdir_fmt %{name} Name: python-zope-interface -Version: 4.6.0 -Release: 1%{?dist} +Version: 5.4.0 +Release: 5%{?dist}.1 Summary: Zope 3 Interface Infrastructure License: ZPLv2.1 URL: https://pypi.io/project/zope.interface @@ -26,113 +17,143 @@ or contract. This is a separate distribution of the zope.interface package used in Zope 3. -%package -n python2-zope-interface -Summary: Zope 3 Interface Infrastructure -%{?python_provide:%python_provide python2-zope-interface} - -BuildRequires: gcc -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-nose -BuildRequires: python2-zope-event - -Requires: python2-zope-event - -# since F14 -Obsoletes: python-zope-filesystem <= 1-8 - -%description -n python2-zope-interface -Interfaces are a mechanism for labeling objects as conforming to a given API -or contract. - -This is a separate distribution of the zope.interface package used in Zope 3. - -%if 0%{?with_python3} %package -n python3-zope-interface Summary: Zope 3 Interface Infrastructure %{?python_provide:%python_provide python3-zope-interface} +BuildRequires: gcc +BuildRequires: make BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-nose -BuildRequires: python3-zope-event - -Requires: python3-zope-event %description -n python3-zope-interface Interfaces are a mechanism for labeling objects as conforming to a given API or contract. This is a separate distribution of the zope.interface package used in Zope 3. -%endif - -%prep -%setup -n zope.interface-%{version} -q -rm -rf %{modname}.egg-info +%if %{with docs} +%package doc +Summary: Documentation for zope.interface +BuildArch: noarch +BuildRequires: python3-docs +BuildRequires: %{py3_dist sphinx} +BuildRequires: %{py3_dist repoze-sphinx-autointerface} - -%build -%py2_build -%if 0%{?with_python3} -%py3_build +%description doc +Documentation for %{name}. %endif +%prep +%autosetup -n zope.interface-%{version} -%install -# python3 block -%if 0%{?with_python3} -%py3_install +# Update the sphinx theme name +sed -i "s/'default'/'classic'/" docs/conf.py -# Will put docs in %%{_docdir} instead -%{__rm} -f %{buildroot}%{python3_sitearch}/zope/interface/{,tests/}*.txt +# Use local objects.inv for intersphinx +sed -i "s|\('https://docs\.python\.org/': \)None|\1'%{_docdir}/python3-docs/html/objects.inv'|" docs/conf.py -# C files don't need to be packaged -%{__rm} -f %{buildroot}%{python3_sitearch}/zope/interface/_zope_interface_coptimizations.c -%endif +%generate_buildrequires +%pyproject_buildrequires -t -# do it again for python2 -%py2_install +%build +%pyproject_wheel -# Will put docs in %%{_docdir} instead -%{__rm} -f %{buildroot}%{python2_sitearch}/zope/interface/{,tests/}*.txt +%if %{with docs} +# build the sphinx documents +PYTHONPATH=$PWD/src make -C docs html +rm -f docs/_build/html/.buildinfo +%endif +%install +%pyproject_install # C files don't need to be packaged -%{__rm} -f %{buildroot}%{python2_sitearch}/zope/interface/_zope_interface_coptimizations.c +rm -f %{buildroot}%{python3_sitearch}/zope/interface/_zope_interface_coptimizations.c %check -PYTHONPATH=$(pwd) nosetests-2 -%if 0%{?with_python3} -PYTHONPATH=$(pwd) nosetests-3 -%endif +# We have to run tests installed together with the package +# https://github.com/zopefoundation/zope.interface/issues/196 +pushd %{buildroot}%{python3_sitearch} +PURE_PYTHON=1 python3 -m unittest discover -s zope/interface -t . +popd -%files -n python2-zope-interface -%doc README.rst CHANGES.rst COPYRIGHT.txt docs/ -%license LICENSE.txt -%{python2_sitearch}/zope/interface/ -# Co-own %%{python2_sitearch}/zope/ -%dir %{python2_sitearch}/zope/ -%exclude %{python2_sitearch}/zope/interface/tests/ -%exclude %{python2_sitearch}/zope/interface/common/tests/ -%{python2_sitearch}/zope.interface-*.egg-info -%{python2_sitearch}/zope.interface-*-nspkg.pth - -%if 0%{?with_python3} %files -n python3-zope-interface -%doc README.rst CHANGES.rst COPYRIGHT.txt docs/ -%license LICENSE.txt +%doc README.rst CHANGES.rst +%license COPYRIGHT.txt LICENSE.txt %{python3_sitearch}/zope/interface/ # Co-own %%{python3_sitearch}/zope/ %dir %{python3_sitearch}/zope/ %exclude %{python3_sitearch}/zope/interface/tests/ %exclude %{python3_sitearch}/zope/interface/common/tests/ -%{python3_sitearch}/zope.interface-*.egg-info +%{python3_sitearch}/zope.interface-*.dist-info %{python3_sitearch}/zope.interface-*-nspkg.pth + +%if %{with docs} +%files doc +%doc docs/_build/html/ %endif %changelog -* Wed Jan 24 2024 Sergey Cherevko - 4.6.0-1 -- Rebuilt for MSVSphere 8.9 +* Tue May 14 2024 Arkady L. Shane - 5.4.0-5R.1 +- Rebuilt for MSVSphere 9.4 + +* Fri May 06 2022 Orion Poplawski - 5.4.0-5.1 +- Build without doc for EPEL9 bootstrap + +* Fri Jan 21 2022 Fedora Release Engineering - 5.4.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Sep 8 2021 Jerry James - 5.4.0-4 +- BR gcc to build the optimized interface +- Add doc subpackage to hold Sphinx-built documentation +- Modernize the spec file + +* Fri Jul 23 2021 Fedora Release Engineering - 5.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jun 03 2021 Python Maint - 5.4.0-2 +- Rebuilt for Python 3.10 + +* Thu Apr 29 2021 Lumír Balhar - 5.4.0-1 +- Update to 5.4.0 (#1949876) + +* Wed Jan 27 2021 Fedora Release Engineering - 5.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Nov 19 2020 Lumír Balhar - 5.2.0-1 +- Update to 5.2.0 (#1894930) + +* Fri Oct 02 2020 Lumír Balhar - 5.1.2-1 +- Update to 5.1.2 (#1883998) + +* Wed Jul 29 2020 Fedora Release Engineering - 5.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat May 23 2020 Miro Hrončok - 5.1.0-2 +- Rebuilt for Python 3.9 + +* Thu Apr 09 2020 Lumír Balhar - 5.1.0-1 +- Update to 5.1.0 (#1822171) + +* Fri Mar 20 2020 Lumír Balhar - 5.0.2-1 +- Update to 5.0.2 (#1815086) + +* Thu Jan 30 2020 Fedora Release Engineering - 4.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Nov 19 2019 Lumír Balhar - 4.7.1-1 +- Update to 4.7.1 (#1771185) + +* Fri Oct 25 2019 Lumír Balhar - 4.6.0-5 +- Python 2 subpackage removed + +* Thu Oct 03 2019 Miro Hrončok - 4.6.0-4 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Fri Aug 16 2019 Miro Hrončok - 4.6.0-3 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 4.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Tue Feb 05 2019 Lumír Balhar - 4.6.0-1 - New upstream version