From cd25d7b26f0c1e8bbb37f990200c88232a448454 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 02 2019 16:55:19 +0000 Subject: import python-jwcrypto-0.4.2-1.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b246d97 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/jwcrypto-0.4.2.tar.gz diff --git a/.python-jwcrypto.metadata b/.python-jwcrypto.metadata new file mode 100644 index 0000000..4e10ded --- /dev/null +++ b/.python-jwcrypto.metadata @@ -0,0 +1 @@ +a2e05c7f468e1a4b1d4e291a6e969868bacafc38 SOURCES/jwcrypto-0.4.2.tar.gz diff --git a/SOURCES/jwcrypto-0.4.2.tar.gz.sha512sum.txt b/SOURCES/jwcrypto-0.4.2.tar.gz.sha512sum.txt new file mode 100644 index 0000000..754e617 --- /dev/null +++ b/SOURCES/jwcrypto-0.4.2.tar.gz.sha512sum.txt @@ -0,0 +1 @@ +b21bd13013ed91e2c5bbffb51c1380b761f5d26e930edc047c3f9ebf37d604aa822a12c9d4f42d5c52a66f97bca1c6cecd586c8100159ea2c15459a35a784cd0 dist/jwcrypto-0.4.2.tar.gz diff --git a/SPECS/python-jwcrypto.spec b/SPECS/python-jwcrypto.spec new file mode 100644 index 0000000..136cac1 --- /dev/null +++ b/SPECS/python-jwcrypto.spec @@ -0,0 +1,101 @@ +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%define module_name jwcrypto + +Name: python-jwcrypto +Version: 0.4.2 +Release: 1%{?dist} +Summary: Implements JWK,JWS,JWE specifications using python-cryptography + +License: LGPLv3+ +URL: https://github.com/latchset/%{module_name} +Source0: https://github.com/latchset/%{module_name}/releases/download/v%{version}/jwcrypto-%{version}.tar.gz +Source1: https://github.com/latchset/%{module_name}/releases/download/v%{version}/jwcrypto-%{version}.tar.gz.sha512sum.txt + +BuildArch: noarch +BuildRequires: python-devel +BuildRequires: python-setuptools +BuildRequires: python-cryptography >= 1.5 +BuildRequires: pytest +Requires: python-cryptography >= 1.5 + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-cryptography >= 1.5 +BuildRequires: python3-pytest +%endif + +%description +Implements JWK,JWS,JWE specifications using python-cryptography + +%if 0%{?with_python3} +%package -n python3-jwcrypto +Summary: Implements JWK,JWS,JWE specifications using python3-cryptography +Requires: python3-cryptography + +%description -n python3-jwcrypto +Implements JWK,JWS,JWE specifications using python3-cryptography +%endif + +%prep +grep `sha512sum %{SOURCE0}` %{SOURCE1} || (echo "Checksum invalid!" && exit 1) +%setup -q -n %{module_name}-%{version} + + +%build +%{__python2} setup.py build +%if 0%{?with_python3} +%{__python3} setup.py build +%endif + + +%install +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} +%if 0%{?with_python3} +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +%endif +rm -rf %{buildroot}%{_docdir}/%{module_name} +rm -rf %{buildroot}%{python2_sitelib}/%{module_name}/tests{,-cookbook}.py* +%if 0%{?with_python3} +rm -rf %{buildroot}%{python3_sitelib}/%{module_name}/tests{,-cookbook}.py* +rm -rf %{buildroot}%{python3_sitelib}/%{module_name}/__pycache__/tests{,-cookbook}.*.py* +%endif + + +%check +%{__python2} -m py.test -vv ./%{module_name}/tests{,-cookbook}.py +%if 0%{?with_python3} +%{__python3} -m py.test -vv ./%{module_name}/tests{,-cookbook}.py +%endif + + +%files +%doc README.md +%license LICENSE +%{python2_sitelib}/%{module_name} +%{python2_sitelib}/%{module_name}-*.egg-info + +%if 0%{?with_python3} +%files -n python3-jwcrypto +%doc README.md +%license LICENSE +%{python3_sitelib}/%{module_name} +%{python3_sitelib}/%{module_name}-*.egg-info +%endif + + +%changelog +* Thu Aug 17 2017 Christian Heimes - 0.4.2-1 +- Rebase to 0.4.2, resolves rhbz#1434409 + +* Mon Apr 04 2016 Christian Heimes - 0.2.1-2 +- Correct download link + +* Thu Mar 31 2016 Christian Heimes - 0.2.1-1 +- Initial packaging