[packages/python-flask_jwt] - new

qboosh qboosh at pld-linux.org
Sat Dec 20 22:38:00 CET 2025


commit 0d4f20169911fad301e7a4588655d646b8b4930e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Dec 20 22:38:18 2025 +0100

    - new

 Flask-JWT-pytest.patch       |   8 +++
 Flask-JWT-requirements.patch |   6 ++
 python-flask_jwt.spec        | 129 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 143 insertions(+)
---
diff --git a/python-flask_jwt.spec b/python-flask_jwt.spec
new file mode 100644
index 0000000..fea9f8c
--- /dev/null
+++ b/python-flask_jwt.spec
@@ -0,0 +1,129 @@
+#
+# Conditional build:
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# unit tests
+%bcond_without	python2 # CPython 2.x module
+%bcond_with	python3 # CPython 3.x module (not compatible with Flask 3)
+
+Summary:	JWT token authentication for Flask apps
+Summary(pl.UTF-8):	Uwierzytelnianie tokenem JWT dla aplikacji Flaska
+Name:		python-Flask-JWT
+Version:	0.3.2
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/flask-jwt/
+Source0:	https://files.pythonhosted.org/packages/source/F/Flask-JWT/Flask-JWT-%{version}.tar.gz
+# Source0-md5:	878ad79a12afa70ad38a12d5ffd2dc1e
+Patch0:		Flask-JWT-pytest.patch
+Patch1:		Flask-JWT-requirements.patch
+URL:		https://pypi.org/project/Flask-JWT/
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-flask >= 0.9
+BuildRequires:	python-pyjwt >= 1.4.0
+BuildRequires:	python-pytest >= 2.5.2
+#BuildRequires:	python-pytest-cache >= 1.0
+#BuildRequires:	python-pytest-cov >= 1.6
+#BuildRequires:	python-pytest-flakes >= 0.2
+#BuildRequires:	python-pytest-pep8 >= 1.0.5
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.3
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-flask >= 0.9
+BuildRequires:	python3-pyjwt >= 1.4.0
+BuildRequires:	python3-pytest >= 2.5.2
+#BuildRequires:	python3-pytest-cache >= 1.0
+#BuildRequires:	python3-pytest-cov >= 1.6
+#BuildRequires:	python3-pytest-flakes >= 0.2
+#BuildRequires:	python3-pytest-pep8 >= 1.0.5
+%endif
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Flask-JWT is a Flask extension that adds basic Json Web Token features
+to any application.
+
+%description -l pl.UTF-8
+Flask-JWT to rozszerzenie Flaska dodające do dowolnej aplikacji
+podstawową funkcjonalność Json Web Token.
+
+%package -n python3-Flask-JWT
+Summary:	JWT token authentication for Flask apps
+Summary(pl.UTF-8):	Uwierzytelnianie tokenem JWT dla aplikacji Flaska
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.3
+
+%description -n python3-Flask-JWT
+Flask-JWT is a Flask extension that adds basic Json Web Token features
+to any application.
+
+%description -n python3-Flask-JWT -l pl.UTF-8
+Flask-JWT to rozszerzenie Flaska dodające do dowolnej aplikacji
+podstawową funkcjonalność Json Web Token.
+
+%prep
+%setup -q -n Flask-JWT-%{version}
+%patch -P0 -p1
+%patch -P1 -p1
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python} -m pytest tests
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
+%endif
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc CHANGES LICENSE README.rst
+%{py_sitescriptdir}/flask_jwt
+%{py_sitescriptdir}/Flask_JWT-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-Flask-JWT
+%defattr(644,root,root,755)
+%doc CHANGES LICENSE README.rst
+%{py3_sitescriptdir}/flask_jwt
+%{py3_sitescriptdir}/Flask_JWT-%{version}-py*.egg-info
+%endif
diff --git a/Flask-JWT-pytest.patch b/Flask-JWT-pytest.patch
new file mode 100644
index 0000000..4e44d79
--- /dev/null
+++ b/Flask-JWT-pytest.patch
@@ -0,0 +1,8 @@
+--- Flask-JWT-0.3.2/setup.cfg.orig	2015-11-03 15:41:40.000000000 +0100
++++ Flask-JWT-0.3.2/setup.cfg	2025-12-20 21:23:19.346806446 +0100
+@@ -1,4 +1,4 @@
+-[pytest]
++[tool:pytest]
+ pep8maxlinelength = 99
+ pep8ignore = 
+ 	docs/* ALL
diff --git a/Flask-JWT-requirements.patch b/Flask-JWT-requirements.patch
new file mode 100644
index 0000000..22d5e33
--- /dev/null
+++ b/Flask-JWT-requirements.patch
@@ -0,0 +1,6 @@
+--- Flask-JWT-0.3.2/requirements.txt.orig	2015-10-15 17:26:09.000000000 +0200
++++ Flask-JWT-0.3.2/requirements.txt	2025-12-20 21:15:18.642743976 +0100
+@@ -1,2 +1,2 @@
+ Flask>=0.9
+-PyJWT>=1.4.0,<1.5.0
++PyJWT>=1.4.0
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-flask_jwt.git/commitdiff/0d4f20169911fad301e7a4588655d646b8b4930e



More information about the pld-cvs-commit mailing list