1dbefb0
%global srcname pyasn1
c85a003
%global modules_version 0.2.7
1dbefb0
%global sum ASN.1 tools for Python
1dbefb0
%global sum_modules Modules for pyasn1
1dbefb0
%global pkgdesc \
1dbefb0
This is an implementation of ASN.1 types and codecs in the Python \
1dbefb0
programming language.
1dbefb0
%global pkgdesc_modules \
1dbefb0
ASN.1 types modules for python-pyasn1.
1dbefb0
1dbefb0
1dbefb0
Name:           python3-%{srcname}
c85a003
Version:        0.4.7
c85a003
Release:        1%{?dist}
1dbefb0
Summary:        %{sum}
1dbefb0
License:        BSD
1dbefb0
Group:          System Environment/Libraries
c85a003
Source0:        https://github.com/etingof/pyasn1/archive/v%{version}.tar.gz
c85a003
Source1:        https://github.com/etingof/pyasn1-modules/archive/v%{modules_version}.tar.gz
c85a003
URL:            https://github.com/etingof/pyasn1
1dbefb0
BuildArch:      noarch
1dbefb0
BuildRequires:  python-srpm-macros
1dbefb0
BuildRequires:  python%{python3_pkgversion}-devel
1dbefb0
BuildRequires:  python%{python3_pkgversion}-setuptools
1dbefb0
%if 0%{?with_python3_other}
1dbefb0
BuildRequires:  python%{python3_other_pkgversion}-devel
1dbefb0
BuildRequires:  python%{python3_other_pkgversion}-setuptools
1dbefb0
%endif
1dbefb0
1dbefb0
%description %{pkgdesc}
1dbefb0
1dbefb0
1dbefb0
%if %{python3_pkgversion} != 3
1dbefb0
%package -n python%{python3_pkgversion}-%{srcname}
1dbefb0
Summary:    %{sum} %{python3_pkgversion}
1dbefb0
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
1dbefb0
1dbefb0
%description -n python%{python3_pkgversion}-%{srcname} %{pkgdesc}
1dbefb0
%endif
1dbefb0
1dbefb0
%package -n python%{python3_pkgversion}-%{srcname}-modules
1dbefb0
Summary:    %{sum_modules}
1dbefb0
Requires:   python%{python3_pkgversion}-%{srcname} >= %{version}-%{release}
1dbefb0
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}-modules}
1dbefb0
1dbefb0
%description -n python%{python3_pkgversion}-%{srcname}-modules %{pkgdesc_modules}
1dbefb0
1dbefb0
1dbefb0
%if 0%{?with_python3_other}
1dbefb0
%package -n python%{python3_other_pkgversion}-%{srcname}
1dbefb0
Summary:    %{sum} %{python3_other_pkgversion}
1dbefb0
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{srcname}}
1dbefb0
1dbefb0
%description -n python%{python3_other_pkgversion}-%{srcname} %{pkgdesc}
1dbefb0
1dbefb0
%package -n python%{python3_other_pkgversion}-%{srcname}-modules
1dbefb0
Summary:    %{sum_modules}
1dbefb0
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{srcname}-modules}
1dbefb0
1dbefb0
%description -n python%{python3_other_pkgversion}-%{srcname}-modules %{pkgdesc_modules}
1dbefb0
%endif
1dbefb0
1dbefb0
1dbefb0
%prep
1dbefb0
%setup -n %{srcname}-%{version} -q -b1
1dbefb0
1dbefb0
%build
1dbefb0
%py3_build
1dbefb0
pushd ../pyasn1-modules-%{modules_version}
1dbefb0
%py3_build
1dbefb0
popd
1dbefb0
1dbefb0
%if 0%{?with_python3_other}
1dbefb0
%py3_other_build
1dbefb0
pushd ../pyasn1-modules-%{modules_version}
1dbefb0
%py3_other_build
1dbefb0
popd
1dbefb0
%endif
1dbefb0
1dbefb0
1dbefb0
%install
1dbefb0
%py3_install
1dbefb0
pushd ../pyasn1-modules-%{modules_version}
1dbefb0
%py3_install
1dbefb0
popd
1dbefb0
1dbefb0
%if 0%{?with_python3_other}
1dbefb0
%py3_other_install
1dbefb0
pushd ../pyasn1-modules-%{modules_version}
1dbefb0
%py3_other_install
1dbefb0
popd
1dbefb0
%endif
1dbefb0
1dbefb0
1dbefb0
%check
1dbefb0
# PYTHONPATH is required because the the tests expect python3-pyasn1
1dbefb0
# to be installed.
1dbefb0
PYTHONPATH="$RPM_BUILD_ROOT%{python3_sitelib}:$PYTHONPATH" %{__python3} setup.py test
1dbefb0
%if 0%{?with_python3_other}
1dbefb0
PYTHONPATH="$RPM_BUILD_ROOT%{python3_other_sitelib}:$PYTHONPATH" %{__python3_other} setup.py test
1dbefb0
%endif
1dbefb0
1dbefb0
1dbefb0
%files -n python%{python3_pkgversion}-%{srcname}
c85a003
%doc README.md docs
c85a003
%license LICENSE.rst
1dbefb0
%{python3_sitelib}/%{srcname}
1dbefb0
%{python3_sitelib}/%{srcname}-%{version}-*.egg-info/
1dbefb0
1dbefb0
%files -n python%{python3_pkgversion}-%{srcname}-modules
c85a003
%doc README.md
c85a003
%license LICENSE.rst
1dbefb0
%{python3_sitelib}/%{srcname}_modules/
1dbefb0
%{python3_sitelib}/%{srcname}_modules-%{modules_version}-*.egg-info/
1dbefb0
1dbefb0
%if 0%{?with_python3_other}
1dbefb0
%files -n python%{python3_other_pkgversion}-%{srcname}
c85a003
%doc README.md docs
c85a003
%license LICENSE.rst
1dbefb0
%{python3_other_sitelib}/%{srcname}
1dbefb0
%{python3_other_sitelib}/%{srcname}-%{version}-*.egg-info/
1dbefb0
1dbefb0
%files -n python%{python3_other_pkgversion}-%{srcname}-modules
c85a003
%doc README.md
c85a003
%license LICENSE.rst
1dbefb0
%{python3_other_sitelib}/%{srcname}_modules/
1dbefb0
%{python3_other_sitelib}/%{srcname}_modules-%{modules_version}-*.egg-info/
1dbefb0
%endif
1dbefb0
1dbefb0
1dbefb0
%changelog
c85a003
* Mon Oct 28 2019 Avram Lubkin <aviso@rokhopper.net> - 0.4.7
c85a003
- Updated to 0.4.7
c85a003
c738f3c
* Thu Mar 07 2019 Troy Dawson <tdawson@redhat.com> - 0.1.9-2
c738f3c
- Rebuilt to change main python from 3.4 to 3.6
c738f3c
1dbefb0
* Wed Aug 16 2017 Aurelien Bompard <abompard@fedoraproject.org> - 0.1.9-1
1dbefb0
- Build for Python3-only on EPEL from the Fedora spec.
1dbefb0
  http://fedoraproject.org/wiki/PackagingDrafts:Python3EPEL
1dbefb0
- Modernize the spec a bit (macros)