Compare commits

..

No commits in common. 'c8' and 'i10fe' have entirely different histories.
c8 ... i10fe

3
.gitignore vendored

@ -1,2 +1 @@
SOURCES/Werkzeug-0.12.2.tar.gz
SOURCES/werkzeug-sphinx-theme.tar.gz
SOURCES/werkzeug-3.0.6.tar.gz

@ -1,2 +1 @@
fe5c3e287ae54cfefc25fd3eec800599b8026b49 SOURCES/Werkzeug-0.12.2.tar.gz
d17d2797ce629f561c025229c30ab0622b2ab2d8 SOURCES/werkzeug-sphinx-theme.tar.gz
7db8837d19d37820ffcb945ea358a493d151e9a9 SOURCES/werkzeug-3.0.6.tar.gz

@ -0,0 +1,36 @@
From e9b2ff8c37f2721f67caf634d964c946895c1816 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 23 Apr 2024 13:57:19 -0700
Subject: [PATCH] Fix tests with pytest-xprocess 1.0+
See https://github.com/pallets/werkzeug/issues/2875#issuecomment-2044203708
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
tests/conftest.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/conftest.py b/tests/conftest.py
index b73202cd..905f3f4b 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -107,10 +107,12 @@ def dev_server(xprocess, request, tmp_path):
new_python_path = str(tmp_path)
env = {**os.environ, "PYTHONPATH": new_python_path, "PYTHONUNBUFFERED": "1"}
- @cached_property
- def pattern(self):
- client.request("/ensure")
- return "GET /ensure"
+ def startup_check(self):
+ try:
+ client.request("/ensure")
+ return True
+ except (ConnectionRefusedError, FileNotFoundError):
+ return False
# Each test that uses the fixture will have a different log.
xp_name = f"dev_server-{request.node.name}"
--
2.44.0

@ -0,0 +1,34 @@
From b88042cfb32866a00d39b678bb224eb55ecf53c1 Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Tue, 22 Jun 2021 22:10:17 +0200
Subject: [PATCH] Preserve any existing PYTHONPATH in tests
---
tests/conftest.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/conftest.py b/tests/conftest.py
index 4ad1ff23..7200d286 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -118,9 +118,15 @@ def dev_server(xprocess, request, tmp_path):
class Starter(ProcessStarter):
args = [sys.executable, run_path, name, json.dumps(kwargs)]
# Extend the existing env, otherwise Windows and CI fails.
- # Modules will be imported from tmp_path for the reloader.
+ # Modules will be imported from tmp_path for the reloader
+ # but any existing PYTHONPATH is preserved.
# Unbuffered output so the logs update immediately.
- env = {**os.environ, "PYTHONPATH": str(tmp_path), "PYTHONUNBUFFERED": "1"}
+ original_python_path = os.getenv("PYTHONPATH")
+ if original_python_path:
+ new_python_path = os.pathsep.join((original_python_path, str(tmp_path)))
+ else:
+ new_python_path = str(tmp_path)
+ env = {**os.environ, "PYTHONPATH": new_python_path, "PYTHONUNBUFFERED": "1"}
@cached_property
def pattern(self):
--
2.31.1

@ -1,148 +1,269 @@
%global srcname Werkzeug
## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 1;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
%global srcname werkzeug
%global modname werkzeug
# Tests require among others python-greenlet which is not available
# during the early phases of a new Python integration, which in turn blocks
# many other important packages from building.
# With the conditionalized build, the rebuild can proceed
%bcond tests 1
Name: python-%{modname}
Version: 3.0.6
Release: %autorelease
Summary: Comprehensive WSGI web application library
License: BSD-3-Clause
URL: https://werkzeug.palletsprojects.com
Source0: %{pypi_source}
# Fixes PYTHONPATH handling in tests
# Upstream: https://github.com/pallets/werkzeug/pull/2172
Patch: preserve-any-existing-PYTHONPATH-in-tests.patch
# Fix tests with pytest-xprocess 1.0+
# https://github.com/pallets/werkzeug/issues/2875#issuecomment-2044203708
Patch: 0001-Fix-tests-with-pytest-xprocess-1.0.patch
%if 0%{?rhel} > 7
# Disable python2 build by default
%bcond_with python2
BuildArch: noarch
%global _description %{expand:
Werkzeug
========
Werkzeug started as simple collection of various utilities for WSGI
applications and has become one of the most advanced WSGI utility
modules. It includes a powerful debugger, full featured request and
response objects, HTTP utilities to handle entity tags, cache control
headers, HTTP dates, cookie handling, file uploads, a powerful URL
routing system and a bunch of community contributed addon modules.
Werkzeug is unicode aware and doesn't enforce a specific template
engine, database adapter or anything else. It doesn't even enforce
a specific way of handling requests and leaves all that up to the
developer. It's most useful for end user applications which should work
on as many server environments as possible (such as blogs, wikis,
bulletin boards, etc.).}
%description %{_description}
%package -n python3-%{modname}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{modname}}
BuildRequires: make
BuildRequires: python3-devel
%description -n python3-%{modname} %{_description}
%package -n python3-werkzeug-doc
Summary: Documentation for python3-werkzeug
Requires: python3-werkzeug = %{version}-%{release}
%description -n python3-werkzeug-doc
Documentation and examples for python3-werkzeug.
%generate_buildrequires
%if %{with tests}
# -t picks test.txt by default which contains too tight pins
%pyproject_buildrequires requirements/tests.in requirements/docs.in
%else
%bcond_without python2
%pyproject_buildrequires -r requirements/docs.in
%endif
Name: python-werkzeug
Version: 0.12.2
Release: 4%{?dist}
Summary: The Swiss Army knife of Python web development
%prep
%autosetup -p1 -n %{srcname}-%{version}
# Relax xprocess requirement
sed -i 's/pytest-xprocess<1/pytest-xprocess/g' requirements/tests.in
# Relax forgotten rc1 in pin
sed -i 's/cffi==1.17.0rc1/cffi/g' requirements/tests.in
Group: Development/Libraries
License: BSD
URL: http://werkzeug.pocoo.org/
Source0: https://files.pythonhosted.org/packages/source/W/Werkzeug/%{srcname}-%{version}.tar.gz
# Pypi version of werkzeug is missing _themes folder needed to build werkzeug sphinx docs
# See https://github.com/mitsuhiko/werkzeug/issues/761
Source1: werkzeug-sphinx-theme.tar.gz
find examples/ -type f -name '*.png' -executable -print -exec chmod -x "{}" +
BuildArch: noarch
%build
%pyproject_wheel
%global _description\
Werkzeug\
========\
\
Werkzeug started as simple collection of various utilities for WSGI\
applications and has become one of the most advanced WSGI utility\
modules. It includes a powerful debugger, full featured request and\
response objects, HTTP utilities to handle entity tags, cache control\
headers, HTTP dates, cookie handling, file uploads, a powerful URL\
routing system and a bunch of community contributed addon modules.\
\
Werkzeug is unicode aware and doesn't enforce a specific template\
engine, database adapter or anything else. It doesn't even enforce\
a specific way of handling requests and leaves all that up to the\
developer. It's most useful for end user applications which should work\
on as many server environments as possible (such as blogs, wikis,\
bulletin boards, etc.).\
%install
%pyproject_install
%pyproject_save_files %{modname}
pushd docs
# PYTHONPATH to prevent "'Werkzeug' must be installed to build the documentation."
make PYTHONPATH=%{buildroot}/%{python3_sitelib} SPHINXBUILD=sphinx-build-3 html
rm -v _build/html/.buildinfo
popd
%description %_description
%check
%py3_check_import %{modname}
%if %{with tests}
# deselect the test_exclude_patterns test case as it's failing
# when we set PYTHONPATH: https://github.com/pallets/werkzeug/issues/2404
%pytest -Wdefault --deselect tests/test_serving.py::test_exclude_patterns
%endif
%if %{with python2}
%package -n python2-werkzeug
Summary: %summary
%files -n python3-%{modname} -f %{pyproject_files}
%license LICENSE.txt
%doc CHANGES.rst README.md
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%files -n python3-werkzeug-doc
%doc docs/_build/html examples
%{?python_provide:%python_provide python2-werkzeug}
%changelog
* Thu Dec 26 2024 Dmitriy Samoylik <samoylikdv@msvsphere-os.ru> - 3.0.6-1
- Rebuilt for MSVSphere 10
%description -n python2-werkzeug %_description
%endif # with python2
## START: Generated by rpmautospec
* Fri Nov 01 2024 František Zatloukal <fzatlouk@redhat.com> - 3.0.6-1
- Update to 3.0.6
* Thu Oct 10 2024 Troy Dawson <tdawson@redhat.com> - 3.0.4-3
- Fix License: python-werkzeug uses BSD-3-Clause
%package -n python3-werkzeug
Summary: %summary
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 3.0.4-2
- convert license to SPDX
BuildRequires: python3-devel
BuildRequires: python3-setuptools
* Thu Aug 22 2024 František Zatloukal <fzatlouk@redhat.com> - 3.0.4-1
- Update to 3.0.4 (RHBZ#2307082)
%{?python_provide:%python_provide python3-werkzeug}
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
%description -n python3-werkzeug %_description
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 3.0.3-3
- Rebuilt for Python 3.13
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 3.0.3-2
- Bootstrap for Python 3.13
%package -n python-werkzeug-doc
Summary: Documentation for python3-werkzeug
* Mon May 06 2024 František Zatloukal <fzatlouk@redhat.com> - 3.0.3-1
- Update to 3.0.3 (fixes RHBZ#2279213)
BuildRequires: python3-sphinx
* Tue Apr 23 2024 Adam Williamson <awilliam@redhat.com> - 3.0.2-2
- Fix tests with pytest-xprocess 1.0+
Requires: python3-werkzeug = %{version}-%{release}
* Wed Apr 10 2024 Frantisek Zatloukal <fzatlouk@redhat.com> - 3.0.2-1
- Update to 3.0.2 (fixes RHBZ#2272538)
%description -n python-werkzeug-doc
Documentation and examples for python-werkzeug.
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
%prep
%setup -q -n %{srcname}-%{version}
%{__sed} -i 's/\r//' LICENSE
%{__sed} -i '1d' tests/multipart/test_collect.py
tar -xf %{SOURCE1}
* Wed Dec 06 2023 Frantisek Zatloukal <fzatlouk@redhat.com> - 3.0.1-1
- Update to 3.0.1 (fixes RHBZ#2189658)
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 2.2.3-2
- Rebuilt for Python 3.12
%build
%if %{with python2}
%py2_build
find examples/ -name '*.py' -executable | xargs chmod -x
find examples/ -name '*.png' -executable | xargs chmod -x
%endif # with python2
pushd %{py3dir}
%py3_build
find examples/ -name '*.py' -executable | xargs chmod -x
find examples/ -name '*.png' -executable | xargs chmod -x
popd
* Mon Feb 20 2023 Frantisek Zatloukal <fzatlouk@redhat.com> - 2.2.3-1
- Update to 2.2.3 (fixes RHBZ#2169828)
pushd docs
# Add a symlink to the dir with the Python module so that __version__ can be
# obtained therefrom.
ln -s ../werkzeug werkzeug
make SPHINXBUILD=sphinx-build-3 html
popd
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Aug 09 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 2.2.2-1
- Update to 2.2.2 (fixes RHBZ#2116571)
%install
%if %{with python2}
%py2_install
%endif # with python2
* Thu Jul 28 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 2.2.1-1
- Update to 2.2.1 (fixes RHBZ#2069345)
pushd %{py3dir}
%py3_install
popd
%{__rm} -rf docs/_build/html/.buildinfo
%{__rm} -rf examples/cupoftee/db.pyc
%if %{with python2}
%files -n python2-werkzeug
%license LICENSE
%doc AUTHORS PKG-INFO CHANGES
%{python2_sitelib}/*
%endif # with python2
%files -n python3-werkzeug
%license LICENSE
%doc AUTHORS PKG-INFO CHANGES
%{python3_sitelib}/*
%files -n python-werkzeug-doc
%doc docs/_build/html examples
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 2.0.3-2
- Rebuilt for Python 3.11
%changelog
* Fri Jun 22 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.12.2-4
- Use python3-sphinx for the docs
* Mon Feb 21 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 2.0.3-1
- Update to 2.0.3
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Nov 10 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 2.0.2-1
- Update to 2.0.2
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jun 22 2021 Lumír Balhar <lbalhar@redhat.com> - 2.0.1-1
- Update to 2.0.1
Resolves: rhbz#1795102
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1.0.1-6
- Rebuilt for Python 3.10
* Thu May 13 2021 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-5
- Workaround failing tests with pytest 6.2+
- Fixes: rhbz#1928083
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-2
- Rebuilt for Python 3.9
* Wed Apr 08 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.0.1-1
- Update to 1.0.1
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jun 22 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.12.2-3
- Conditionalize the python2 subpackage
* Tue Jan 07 2020 Lumír Balhar <lbalhar@redhat.com> - 0.16.0-1
- New upstream version 0.16.0 (#1690599)
* Wed Sep 18 2019 Miro Hrončok <mhroncok@redhat.com> - 0.14.1-12
- Subpackage python2-werkzeug has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 0.14.1-11
- Rebuilt for Python 3.8
* Mon Jul 29 2019 Petr Viktorin <pviktori@redhat.com> - 0.14.1-10
- Remove non-essential Python 2 test dependencies
https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Removing_Requirements
- Use system Python interpreter in tests
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Apr 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.14.1-8
- Remove python2-werkzeug-doc
https://fedoraproject.org/wiki/Changes/Sphinx2
* Sun Feb 17 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.14.1-7
- Backport fix to tests using 'python' command
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jul 16 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14.1-5
- Make sure we ship Python 3 docs in the Python 3 docs package
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14.1-3
- Rebuilt for Python 3.7
* Tue Jun 05 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14.1-2
- Don't BR watchdog, it is not needed
* Wed May 09 2018 Adam Williamson <awilliam@redhat.com> - 0.14.1-1
- Update to 0.14.1 (needed by httpbin)
- Run tests during build
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
@ -247,3 +368,5 @@ popd
* Tue Aug 25 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.5.1-1
- Initial package
## END: Generated by rpmautospec

Loading…
Cancel
Save