diff options
Diffstat (limited to 'python-sanic-jwt.spec')
| -rw-r--r-- | python-sanic-jwt.spec | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/python-sanic-jwt.spec b/python-sanic-jwt.spec new file mode 100644 index 0000000..2c5e3b7 --- /dev/null +++ b/python-sanic-jwt.spec @@ -0,0 +1,134 @@ +%global _empty_manifest_terminate_build 0 +Name: python-sanic-jwt +Version: 1.8.0 +Release: 1 +Summary: JWT oauth flow for Sanic +License: MIT +URL: https://github.com/ahopkins/sanic-jwt +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/44/cf/380f4c698683d886b2c8a08ea68ffe11e8a75ccf354035c768bc842613bf/sanic-jwt-1.8.0.tar.gz +BuildArch: noarch + +Requires: python3-pyjwt +Requires: python3-Sphinx +Requires: python3-Jinja2 +Requires: python3-Sphinx +Requires: python3-Jinja2 + +%description +**What do I do?** +It's easy: (1) install, (2) initialize, and (3) authenticate. +**Install:** +``` +pip install sanic-jwt +``` + [Sanic]: http://sanic.readthedocs.io + [JWT]: https://jwt.io +**Initialize:** +```python +from sanic import Sanic +from sanic_jwt import Initialize +def my_authenticate(request, *args, **kwargs): +app = Sanic() +Initialize( + app, + authenticate=my_authenticate +) +``` +**Authenticate:** + +%package -n python3-sanic-jwt +Summary: JWT oauth flow for Sanic +Provides: python-sanic-jwt +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-sanic-jwt +**What do I do?** +It's easy: (1) install, (2) initialize, and (3) authenticate. +**Install:** +``` +pip install sanic-jwt +``` + [Sanic]: http://sanic.readthedocs.io + [JWT]: https://jwt.io +**Initialize:** +```python +from sanic import Sanic +from sanic_jwt import Initialize +def my_authenticate(request, *args, **kwargs): +app = Sanic() +Initialize( + app, + authenticate=my_authenticate +) +``` +**Authenticate:** + +%package help +Summary: Development documents and examples for sanic-jwt +Provides: python3-sanic-jwt-doc +%description help +**What do I do?** +It's easy: (1) install, (2) initialize, and (3) authenticate. +**Install:** +``` +pip install sanic-jwt +``` + [Sanic]: http://sanic.readthedocs.io + [JWT]: https://jwt.io +**Initialize:** +```python +from sanic import Sanic +from sanic_jwt import Initialize +def my_authenticate(request, *args, **kwargs): +app = Sanic() +Initialize( + app, + authenticate=my_authenticate +) +``` +**Authenticate:** + +%prep +%autosetup -n sanic-jwt-1.8.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-sanic-jwt -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.8.0-1 +- Package Spec generated |
