Standarize macros
This commit is contained in:
parent
5a866a5134
commit
d979347857
@ -1,5 +1,13 @@
|
|||||||
%global _docdir_fmt %{name}
|
%global _docdir_fmt %{name}
|
||||||
%global srcname jwt
|
|
||||||
|
# what it's called on pypi
|
||||||
|
%global srcname PyJWT
|
||||||
|
# what it's imported as
|
||||||
|
%global libname jwt
|
||||||
|
# name of egg info directory
|
||||||
|
%global eggname %{srcname}
|
||||||
|
# package name fragment
|
||||||
|
%global pkgname %{libname}
|
||||||
|
|
||||||
%global _description \
|
%global _description \
|
||||||
A Python implementation of JSON Web Token draft 01. This library provides a\
|
A Python implementation of JSON Web Token draft 01. This library provides a\
|
||||||
@ -8,13 +16,13 @@ claims to be transferred between two parties encoded as digitally signed and\
|
|||||||
encrypted JSON objects.
|
encrypted JSON objects.
|
||||||
|
|
||||||
|
|
||||||
Name: python-jwt
|
Name: python-%{pkgname}
|
||||||
Version: 1.6.4
|
Version: 1.6.4
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: JSON Web Token implementation in Python
|
Summary: JSON Web Token implementation in Python
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/jpadilla/pyjwt
|
URL: https://github.com/jpadilla/pyjwt
|
||||||
Source0: %pypi_source PyJWT
|
Source0: %pypi_source
|
||||||
Patch0: disable-coverage-and-runner.patch
|
Patch0: disable-coverage-and-runner.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -22,34 +30,34 @@ BuildArch: noarch
|
|||||||
%description %{_description}
|
%description %{_description}
|
||||||
|
|
||||||
|
|
||||||
%package -n python2-%{srcname}
|
%package -n python2-%{pkgname}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-setuptools
|
BuildRequires: python2-setuptools
|
||||||
BuildRequires: python2-cryptography >= 1.4.0
|
BuildRequires: python2-cryptography >= 1.4.0
|
||||||
BuildRequires: python2-pytest
|
BuildRequires: python2-pytest
|
||||||
Requires: python2-cryptography >= 1.4.0
|
Requires: python2-cryptography >= 1.4.0
|
||||||
%{?python_provide:%python_provide python2-%{srcname}}
|
%{?python_provide:%python_provide python2-%{pkgname}}
|
||||||
|
|
||||||
|
|
||||||
%description -n python2-%{srcname} %{_description}
|
%description -n python2-%{pkgname} %{_description}
|
||||||
|
|
||||||
|
|
||||||
%package -n python%{python3_pkgversion}-%{srcname}
|
%package -n python%{python3_pkgversion}-%{pkgname}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||||
BuildRequires: python%{python3_pkgversion}-cryptography >= 1.4.0
|
BuildRequires: python%{python3_pkgversion}-cryptography >= 1.4.0
|
||||||
BuildRequires: python%{python3_pkgversion}-pytest
|
BuildRequires: python%{python3_pkgversion}-pytest
|
||||||
Requires: python%{python3_pkgversion}-cryptography >= 1.4.0
|
Requires: python%{python3_pkgversion}-cryptography >= 1.4.0
|
||||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
|
||||||
|
|
||||||
|
|
||||||
%description -n python%{python3_pkgversion}-%{srcname} %{_description}
|
%description -n python%{python3_pkgversion}-%{pkgname} %{_description}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n PyJWT-%{version} -p 1
|
%autosetup -n %{srcname}-%{version} -p 1
|
||||||
# prevent pullng in `addopts` for pytest run later
|
# prevent pullng in `addopts` for pytest run later
|
||||||
rm setup.cfg
|
rm setup.cfg
|
||||||
|
|
||||||
@ -69,18 +77,18 @@ py.test-%{python2_version} --verbose
|
|||||||
py.test-%{python3_version} --verbose
|
py.test-%{python3_version} --verbose
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-jwt
|
%files -n python2-%{pkgname}
|
||||||
%doc README.rst AUTHORS
|
%doc README.rst AUTHORS
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python2_sitelib}/%{srcname}/
|
%{python2_sitelib}/%{libname}
|
||||||
%{python2_sitelib}/PyJWT-%{version}-py%{python2_version}.egg-info
|
%{python2_sitelib}/%{eggname}-%{version}-py%{python2_version}.egg-info
|
||||||
|
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-jwt
|
%files -n python%{python3_pkgversion}-%{pkgname}
|
||||||
%doc README.rst AUTHORS
|
%doc README.rst AUTHORS
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python3_sitelib}/%{srcname}/
|
%{python3_sitelib}/%{libname}
|
||||||
%{python3_sitelib}/PyJWT-%{version}-py%{python3_version}.egg-info
|
%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info
|
||||||
%{_bindir}/pyjwt
|
%{_bindir}/pyjwt
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user