diff options
Diffstat (limited to 'python-pkce.spec')
| -rw-r--r-- | python-pkce.spec | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/python-pkce.spec b/python-pkce.spec new file mode 100644 index 0000000..fdb2b9c --- /dev/null +++ b/python-pkce.spec @@ -0,0 +1,159 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pkce +Version: 1.0.3 +Release: 1 +Summary: PKCE Pyhton generator. +License: MIT +URL: https://github.com/RomeoDespres/pkce +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/29/ea/ddd845c2ec21bf1e8555c782b32dc39b82f0b12764feb9f73ccbb2470f13/pkce-1.0.3.tar.gz +BuildArch: noarch + + +%description +# pkce (Proof Key for Code Exchange) + +Simple Python module to generate PKCE code verifier and code challenge. + + +## Installation + +```bash +pip install pkce +``` + +## Usage + +```python +>>> import pkce +>>> code_verifier, code_challenge = pkce.generate_pkce_pair() +``` + +```python +>>> import pkce +>>> code_verifier = pkce.generate_code_verifier(length=128) +>>> code_challenge = pkce.get_code_challenge(code_verifier) +``` + +## Additional information + +Spec for the PKCE protocol can be found [here](https://tools.ietf.org/html/rfc7636). + + + + +%package -n python3-pkce +Summary: PKCE Pyhton generator. +Provides: python-pkce +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pkce +# pkce (Proof Key for Code Exchange) + +Simple Python module to generate PKCE code verifier and code challenge. + + +## Installation + +```bash +pip install pkce +``` + +## Usage + +```python +>>> import pkce +>>> code_verifier, code_challenge = pkce.generate_pkce_pair() +``` + +```python +>>> import pkce +>>> code_verifier = pkce.generate_code_verifier(length=128) +>>> code_challenge = pkce.get_code_challenge(code_verifier) +``` + +## Additional information + +Spec for the PKCE protocol can be found [here](https://tools.ietf.org/html/rfc7636). + + + + +%package help +Summary: Development documents and examples for pkce +Provides: python3-pkce-doc +%description help +# pkce (Proof Key for Code Exchange) + +Simple Python module to generate PKCE code verifier and code challenge. + + +## Installation + +```bash +pip install pkce +``` + +## Usage + +```python +>>> import pkce +>>> code_verifier, code_challenge = pkce.generate_pkce_pair() +``` + +```python +>>> import pkce +>>> code_verifier = pkce.generate_code_verifier(length=128) +>>> code_challenge = pkce.get_code_challenge(code_verifier) +``` + +## Additional information + +Spec for the PKCE protocol can be found [here](https://tools.ietf.org/html/rfc7636). + + + + +%prep +%autosetup -n pkce-1.0.3 + +%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-pkce -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.3-1 +- Package Spec generated |
