diff --git a/.python-flask.metadata b/.python-flask.metadata index b910a22..9f5da5d 100644 --- a/.python-flask.metadata +++ b/.python-flask.metadata @@ -1 +1 @@ -8193757ded6a4f0e7c9a3ce291bf3ae3a1d402c5 SOURCES/Flask-0.12.2.tar.gz +f93034503bcf4e4c13b069d51e8a921d167b0c44 SOURCES/flask-3.0.1.tar.gz diff --git a/SPECS/1 b/SPECS/1 new file mode 100644 index 0000000..d3de701 --- /dev/null +++ b/SPECS/1 @@ -0,0 +1,246 @@ +%global modname flask +%global srcname Flask + +Name: python-%{modname} +Version: 2.0.1 +Release: 1.1%{?dist} +Epoch: 1 +Summary: A micro-framework for Python based on Werkzeug, Jinja 2 and good intentions + +License: BSD +URL: http://flask.pocoo.org/ +Source0: %{pypi_source} + +BuildArch: noarch + +%global _description \ +Flask is called a “micro-framework” because the idea to keep the core\ +simple but extensible. There is no database abstraction layer, no form\ +validation or anything else where different libraries already exist\ +that can handle that. However Flask knows the concept of extensions\ +that can add this functionality into your application as if it was\ +implemented in Flask itself. There are currently extensions for object\ +relational mappers, form validation, upload handling, various open\ +authentication technologies and more. + +%description %{_description} + +%package -n python3-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{modname}} +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(werkzeug) >= 0.15 +BuildRequires: python3dist(jinja2) >= 2.10.1 +BuildRequires: python3dist(itsdangerous) >= 0.24 +BuildRequires: python3dist(click) >= 5.1 +BuildRequires: python3dist(pytest) +Obsoletes: python2-%{modname} < 1:1.0.2-9 + +%description -n python3-%{modname} %{_description} + +Python 3 version. + +%package doc +Summary: Documentation for %{name} +Obsoletes: python3-%{modname}-doc < 1:0.11.1-3 + +%description doc +Documentation and examples for %{name}. + +%prep +%autosetup -n %{srcname}-%{version} +rm -rf examples/flaskr/ +rm -rf examples/minitwit/ +# jinja 2.11 is included in CentOS9 and update to 3.0 in flask is unjustified +# let's try with the version in CentOS +sed -i 's/Jinja2\ >=\ 3\.0/Jinja2/' setup.py + +%build +%py3_build + +%install +%py3_install +mv %{buildroot}%{_bindir}/%{modname}{,-%{python3_version}} +ln -s %{modname}-%{python3_version} %{buildroot}%{_bindir}/%{modname}-3 +ln -sf %{modname}-3 %{buildroot}%{_bindir}/%{modname} + +%check +%pytest + +%files -n python3-%{modname} +%license LICENSE.rst +%doc CHANGES.rst README.rst +%{_bindir}/%{modname} +%{_bindir}/%{modname}-3 +%{_bindir}/%{modname}-%{python3_version} +%{python3_sitelib}/%{srcname}-*.egg-info/ +%{python3_sitelib}/%{modname}/ + +%files doc +%license LICENSE.rst +%doc examples + +%changelog +* Tue Sep 14 2021 Alfredo Moralejo - 2.0.1-1.1 +- Remove minimal vesion of jinja2 + +* Tue Jun 22 2021 Lumír Balhar - 2.0.1-1 +- Update to 2.0.1 +Resolves: rhbz#1950465 + +* Thu Jun 03 2021 Python Maint - 1:1.1.2-6 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 1:1.1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1:1.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun May 24 2020 Miro Hrončok - 1:1.1.2-3 +- Rebuilt for Python 3.9 + +* Wed Apr 08 2020 Igor Raits - 1:1.1.2-2 +- Simplify packaging + +* Fri Apr 03 2020 Fedora Release Monitoring - 1:1.1.2-1 +- Update to 1.1.2 (#1820730) + +* Thu Jan 30 2020 Fedora Release Engineering - 1:1.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 07 2020 Miro Hrončok - 1:1.1.1-1 +- Update to 1.1.1 (#1711414) + +* Wed Oct 30 2019 Miro Hrončok - 1:1.0.2-9 +- Obsolete proper version of python2-flask to fix an upgrade path issue (#1767198) + +* Wed Sep 18 2019 Miro Hrončok - 1:1.0.2-8 +- Subpackage python2-flask has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Sat Aug 17 2019 Miro Hrončok - 1:1.0.2-7 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1:1.0.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Mar 08 2019 François Cami - 1:1.0.2-5 +- Remove python2-sphinx dependency since it's not used anymore. + +* Sat Feb 02 2019 Fedora Release Engineering - 1:1.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1:1.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jun 18 2018 Miro Hrončok - 1:1.0.2-2 +- Rebuilt for Python 3.7 + +* Fri Jun 01 2018 Ken Dreyer 1:1.0.2-1 +- Update to 1.0.2 (rhbz#1572414) +- Do not build Sphinx docs (pallet-sphinx-themes not available) + +* Fri Apr 27 2018 Ricky Elrod - 1:1.0-1 +- new version + +* Thu Feb 15 2018 itamar - 1:0.12.2-1 +- new version + +* Fri Feb 09 2018 Fedora Release Engineering - 1:0.11.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 18 2018 Iryna Shcherbina - 1:0.11.1-7 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Thu Jul 27 2017 Fedora Release Engineering - 1:0.11.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1:0.11.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Dec 13 2016 Stratakis Charalampos - 1:0.11.1-4 +- Rebuild for Python 3.6 +- Have rpmbuild to not fail on python3 test failures + +* Mon Aug 22 2016 Igor Gnatenko - 1:0.11.1-3 +- Fix FTBFS +- Ton of fixes in spec + +* Tue Aug 16 2016 Ricky Elrod - 1:0.11.1-2 +- Attempt a completely fresh build with new NVR. + +* Tue Aug 16 2016 Ricky Elrod - 1:0.11.1-1 +- Latest upstream release. + +* Tue Jul 19 2016 Fedora Release Engineering - 1:0.10.1-9 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 1:0.10.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Oct 14 2015 Robert Kuska - 1:0.10.1-7 +- Rebuilt for Python3.5 rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 1:0.10.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1:0.10.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue May 13 2014 Bohuslav Kabrda - 1:0.10.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 +- Minor fix to rhel macro logic + +* Mon Jul 29 2013 Haïkel Guémar - 1:0.10.1-3 +- fix wrong requires on sphinx (RHBZ #989361) + +* Sat Jul 20 2013 Ricky Elrod - 1:0.10.1-2 +- Nuke a Python3 specific file owned by python3-setuptools. + +* Sat Jun 15 2013 Haïkel Guémar - 1:0.10.1-1 +- upstream 0.10.1 + +* Thu Feb 14 2013 Fedora Release Engineering - 1:0.9-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Aug 17 2012 Ricky Elrod - 0.9-5 +- Add epoch to subpackage Requires. + +* Wed Aug 8 2012 Ricky Elrod - 0.9-4 +- Fix changelog messup. + +* Wed Aug 8 2012 Ricky Elrod - 0.9-3 +- Unified spec for EL6 and Fedora + +* Sat Jul 21 2012 Fedora Release Engineering - 0.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 2 2012 Haïkel Guémar - 0.9.0-1 +- upstream 0.9 +- spec cleanups + +* Sun Jul 1 2012 Haïkel Guémar - 0.8.1-1 +- upstream 0.8.1 (minor bugfixes) + +* Wed Jan 25 2012 Haïkel Guémar - 0.8.0-1 +- upstream 0.8 + +* Sat Jan 14 2012 Fedora Release Engineering - 0.7.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Nov 16 2011 Dan Young - 0.7.2-2 +- don't own easy-install.pth + +* Fri Jul 22 2011 Steve Milner - 0.7.2-1 +- update for upstream release + +* Thu Feb 24 2011 Dan Young - 0.6.1-2 +- fix rpmlint spelling warning +- BR python2-devel rather than python-devel +- run test suite in check + +* Tue Feb 22 2011 Dan Young - 0.6.1-1 +- Initial package diff --git a/SPECS/python-flask.spec b/SPECS/python-flask.spec index d149dfa..934480c 100644 --- a/SPECS/python-flask.spec +++ b/SPECS/python-flask.spec @@ -1,32 +1,16 @@ -%if 0%{?rhel} > 7 -# Disable python2 build by default -%bcond_with python2 -%else -%bcond_without python2 -%endif - %global modname flask -%global srcname Flask +%global srcname flask +%global with_doc 0 Name: python-%{modname} -Version: 0.12.2 -Release: 4%{?dist} +Version: 3.0.1 +Release: 1%{?dist} Epoch: 1 Summary: A micro-framework for Python based on Werkzeug, Jinja 2 and good intentions License: BSD URL: http://flask.pocoo.org/ -Source0: https://github.com/pallets/flask/releases/download/%{version}/Flask-%{version}.tar.gz - -# rhbz#1623180 -# Backported just this patch because 0.12.3+ have added other changes we cannot take. -Patch0001: 0001-detect-UTF-encodings-when-loading-json.patch - -# rhbz#1585318 -# Backport 0.12.4 changes, other than the theme changes which cause no end of problems since -# they depend on their own pallets_sphinx_theme module. -Patch0002: 0002-Fix-ValueError-for-some-invalid-Range-requests.patch -Patch0003: 0003-be-smarter-about-adding-.cli-to-reloader-command.patch +Source0: %{pypi_source} BuildArch: noarch @@ -42,142 +26,185 @@ authentication technologies and more. %description %{_description} -%if %{with python2} -%package -n python2-%{modname} +%package -n python3-%{modname} Summary: %{summary} -%{?python_provide:%python_provide python2-%{modname}} -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-pytest -%if 0%{?fedora} >= 26 -BuildRequires: python2-werkzeug -Requires: python2-werkzeug -BuildRequires: python2-jinja2 -Requires: python2-jinja2 -BuildRequires: python2-click -Requires: python2-click -BuildRequires: python2-itsdangerous -Requires: python2-itsdangerous -%else -BuildRequires: python-werkzeug -Requires: python-werkzeug -BuildRequires: python-jinja2 -Requires: python-jinja2 -BuildRequires: python-click -Requires: python-click -BuildRequires: python-itsdangerous -Requires: python-itsdangerous -%endif -%description -n python2-%{modname} %{_description} - -Python 2 version. -%endif # with python2 +BuildRequires: make +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros -%package -n python%{python3_pkgversion}-%{modname} -Summary: %{summary} -%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}} -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: python%{python3_pkgversion}-pytest -BuildRequires: python%{python3_pkgversion}-jinja2 -BuildRequires: python%{python3_pkgversion}-werkzeug -BuildRequires: python%{python3_pkgversion}-itsdangerous -BuildRequires: python%{python3_pkgversion}-click -Requires: python%{python3_pkgversion}-jinja2 -Requires: python%{python3_pkgversion}-werkzeug -Requires: python%{python3_pkgversion}-itsdangerous -Requires: python%{python3_pkgversion}-click - -%description -n python%{python3_pkgversion}-%{modname} %{_description} +%description -n python3-%{modname} %{_description} Python 3 version. +%if 0%{?with_doc} %package doc Summary: Documentation for %{name} -Obsoletes: python%{python3_pkgversion}-%{modname}-doc < 1:0.11.1-3 -BuildRequires: python3-sphinx %description doc Documentation and examples for %{name}. +%endif + +%generate_buildrequires +# -t picks test.txt by default which contains too tight pins +%pyproject_buildrequires requirements/tests.in requirements/docs.in %prep -%autosetup -p1 -n %{srcname}-%{version} +%autosetup -n %{srcname}-%{version} rm -rf examples/flaskr/ rm -rf examples/minitwit/ +sed -i '/sphinx-tabs/d' requirements/docs.in +sed -i 's/"Jinja2.*"/"Jinja2"/' pyproject.toml %build -%if %{with python2} -%py2_build -%endif # with python2 -%py3_build -PYTHONPATH=`pwd` sphinx-build-3 -b html docs/ docs/_build/html/ -rm -rf docs/_build/html/{.buildinfo,.doctrees} +%pyproject_wheel %install -%if %{with python2} -%py2_install -mv %{buildroot}%{_bindir}/%{modname}{,-%{python2_version}} -ln -s %{modname}-%{python2_version} %{buildroot}%{_bindir}/%{modname}-2 -%endif # with python2 +%pyproject_install +%pyproject_save_files %{modname} -%py3_install mv %{buildroot}%{_bindir}/%{modname}{,-%{python3_version}} ln -s %{modname}-%{python3_version} %{buildroot}%{_bindir}/%{modname}-3 - -%if %{with python2} -ln -sf %{modname}-2 %{buildroot}%{_bindir}/%{modname} -%else ln -sf %{modname}-3 %{buildroot}%{_bindir}/%{modname} -%endif # with python2 + +%if 0%{?with_doc} +pushd docs +# PYTHONPATH to prevent "'Flask' must be installed to build the documentation." +make PYTHONPATH=%{buildroot}/%{python3_sitelib} SPHINXBUILD=sphinx-build-3 html +rm -v _build/html/.buildinfo +popd +%endif %check -export LC_ALL=C.UTF-8 -%if %{with python2} -PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -v -%endif # with python2 -PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v || : - -%if %{with python2} -%files -n python2-%{modname} -%license LICENSE -%doc CHANGES README -%{_bindir}/%{modname}-2 -%{_bindir}/%{modname}-%{python2_version} -%{python2_sitelib}/%{srcname}-*.egg-info/ -%{python2_sitelib}/%{modname}/ +%pytest -Wdefault +%files -n python3-%{modname} -f %{pyproject_files} +%license LICENSE.rst +%doc CHANGES.rst README.rst %{_bindir}/%{modname} -%endif # with python2 - -%files -n python%{python3_pkgversion}-%{modname} -%license LICENSE -%doc CHANGES README %{_bindir}/%{modname}-3 %{_bindir}/%{modname}-%{python3_version} -%{python3_sitelib}/%{srcname}-*.egg-info/ -%{python3_sitelib}/%{modname}/ - -%if %{without python2} -%{_bindir}/%{modname} -%endif # without python2 +%if 0%{?with_doc} %files doc -%license LICENSE +%license LICENSE.rst %doc docs/_build/html examples +%endif %changelog -* Thu Nov 07 2019 Brian C. Lane - 0.12.2-4 -- Add upstream changes from 0.12.4 - Resolves: rhbz#1585318 -- Add TestJSON to the gating test from upstream - Related: rhbz#1585318 - -* Wed Sep 05 2018 Brian C. Lane - 0.12.2-3 -- detect UTF encodings when loading json (CVE-2018-1000656) - Resolves: rhbz#1623180 - -* Wed Jun 20 2018 Charalampos Stratakis - 1:0.12.2-2 -- Conditionalize the python2 subpackage +* Mon Jan 22 2024 Frantisek Zatloukal - 3.0.1-1 +- Update to 3.0.1 (fixes RHBZ#2259051) + +* Mon Jan 22 2024 Fedora Release Engineering - 1:3.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Dec 06 2023 Frantisek Zatloukal - 3.0.0-1 +- Update to 3.0.0 (fixes RHBZ#2189630) + +* Fri Jul 21 2023 Fedora Release Engineering - 1:2.2.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jun 16 2023 Python Maint - 1:2.2.5-2 +- Rebuilt for Python 3.12 + +* Tue May 09 2023 Frantisek Zatloukal - 2.2.5-1 +- Update to 2.2.5 (fixes RHBZ#2196644) + +* Mon Feb 20 2023 Frantisek Zatloukal - 2.2.3-1 +- Update to 2.2.3 (fixes RHBZ#2170230) + +* Fri Jan 20 2023 Fedora Release Engineering - 1:2.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Aug 09 2022 Frantisek Zatloukal - 2.2.2-1 +- Update to 2.2.2 (closes RHBZ#2116586) + +* Thu Aug 04 2022 Frantisek Zatloukal - 2.2.1-1 +- Update to 2.2.1 (closes RHBZ#2113719) + +* Fri Jul 22 2022 Fedora Release Engineering - 1:2.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jul 18 2022 Frantisek Zatloukal - 2.1.3-1 +- Update to 2.1.3 + +* Tue Jun 14 2022 Python Maint - 1:2.1.2-2 +- Rebuilt for Python 3.11 + +* Wed May 11 2022 Charalampos Stratakis - 2.1.2-1 +- Update to 2.1.2 +- Fixes: rhbz#2069375 + +* Mon Feb 21 2022 Frantisek Zatloukal - 2.0.3-1 +- Update to 2.0.3 + +* Fri Jan 21 2022 Fedora Release Engineering - 1:2.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Nov 10 2021 Frantisek Zatloukal - 2.0.2-1 +- Update to 2.0.2 + +* Fri Jul 23 2021 Fedora Release Engineering - 1:2.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jun 22 2021 Lumír Balhar - 2.0.1-1 +- Update to 2.0.1 +Resolves: rhbz#1950465 + +* Thu Jun 03 2021 Python Maint - 1:1.1.2-6 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 1:1.1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1:1.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun May 24 2020 Miro Hrončok - 1:1.1.2-3 +- Rebuilt for Python 3.9 + +* Wed Apr 08 2020 Igor Raits - 1:1.1.2-2 +- Simplify packaging + +* Fri Apr 03 2020 Fedora Release Monitoring - 1:1.1.2-1 +- Update to 1.1.2 (#1820730) + +* Thu Jan 30 2020 Fedora Release Engineering - 1:1.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 07 2020 Miro Hrončok - 1:1.1.1-1 +- Update to 1.1.1 (#1711414) + +* Wed Oct 30 2019 Miro Hrončok - 1:1.0.2-9 +- Obsolete proper version of python2-flask to fix an upgrade path issue (#1767198) + +* Wed Sep 18 2019 Miro Hrončok - 1:1.0.2-8 +- Subpackage python2-flask has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Sat Aug 17 2019 Miro Hrončok - 1:1.0.2-7 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1:1.0.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Mar 08 2019 François Cami - 1:1.0.2-5 +- Remove python2-sphinx dependency since it's not used anymore. + +* Sat Feb 02 2019 Fedora Release Engineering - 1:1.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1:1.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jun 18 2018 Miro Hrončok - 1:1.0.2-2 +- Rebuilt for Python 3.7 + +* Fri Jun 01 2018 Ken Dreyer 1:1.0.2-1 +- Update to 1.0.2 (rhbz#1572414) +- Do not build Sphinx docs (pallet-sphinx-themes not available) + +* Fri Apr 27 2018 Ricky Elrod - 1:1.0-1 +- new version * Thu Feb 15 2018 itamar - 1:0.12.2-1 - new version