File python-pyasn1.spec of Package python-pyasn1

# Created by pyp2rpm-3.2.3
%global pypi_name pyasn1

Name:           python-%{pypi_name}
Version:        0.4.2
Release:        1%{?dist}
Summary:        ASN.1 tools for Python 2

License:        BSD
URL:            https://github.com/etingof/pyasn1
Source0:        https://pypi.io/packages/source/p/pyasn1/pyasn1-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
This is an implementation of ASN.1 types and codecs in the Python 2 programming
language.

%package -n     python2-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}

%description -n python2-%{pypi_name}
This is an implementation of ASN.1 types and codecs in the Python 2 programming
language.

%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
This is an implementation of ASN.1 types and codecs in the Python 2 programming
language.

%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py3_build
%py2_build

%install
%py3_install
%py2_install

%files -n python2-%{pypi_name}
%license LICENSE.rst
%doc README.md
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

%files -n python3-%{pypi_name}
%license LICENSE.rst
%doc README.md
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

%changelog
* Mon Dec 25 2017 Yunfei Shi <shiyf2@lenovo.com> - 0.4.2-1
- Initial package.
openSUSE Build Service is sponsored by