Blob Blame History Raw
%global module pyasn1
%global main_dist %{module}_lextudio
%global modules %{module}_modules
%global modules_dist %{modules}_lextudio
%global modules_version 0.2.9

Name:           python-pyasn1-lextudio
Version:        1.1.2
Release:        0.1%{?dist}
Summary:        ASN.1 tools for Python
License:        BSD-2-Clause
Source0:        %{pypi_source pyasn1_lextudio}
Source1:        %{pypi_source pyasn1_modules_lextudio %{modules_version}}
URL:            https://github.com/lextudio/pyasn1
BuildArch:      noarch

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

%package -n python3-pyasn1-lextudio
Summary:        ASN.1 tools for Python 3
Conflicts:      python3-pyasn1
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%{?python_provide:%python_provide python3-pyasn1-lextudio}

%description -n python3-pyasn1-lextudio
This is an implementation of ASN.1 types and codecs in the Python 3 programming
language.

%package -n python3-pyasn1-modules-lextudio
Summary:        Modules for pyasn1
Requires:       python3-pyasn1-lextudio == %{version}
Conflicts:      python3-pyasn1-modules
%{?python_provide:%python_provide python3-pyasn1-modules-lextudio}

%description -n python3-pyasn1-modules-lextudio
ASN.1 types modules for python3-pyasn1-lextudio

%if 0%{?with_doc}
%package doc
Summary:        Documentation for pyasn1-lextudio
BuildRequires:  make
BuildRequires:  python3-sphinx

%description doc
%{summary}.

%endif


%prep
%setup -n %{main_dist}-%{version} -q -b1


%build
%py3_build

pushd ../%{modules_dist}-%{modules_version}
%py3_build
popd

%if 0%{?with_docs}
pushd docs
PYTHONPATH=%{buildroot}%{python3_sitelib} make SPHINXBUILD=sphinx-build-3 html
popd
%endif


%install
%py3_install

pushd ../%{modules_dist}-%{modules_version}
%py3_install
popd


%check
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py test


%files -n python3-pyasn1-lextudio
%doc README.md
%license LICENSE.rst
%{python3_sitelib}/%{module}
%{python3_sitelib}/%{main_dist}-%{version}-*.egg-info/

%files -n python3-pyasn1-modules-lextudio
%{python3_sitelib}/%{modules}/
%{python3_sitelib}/%{modules_dist}-%{modules_version}-*.egg-info/

%if 0%{?with_docs}
%files doc
%license LICENSE.rst
%doc docs/build/html/*
%endif

%changelog
* Thu Feb 22 2024 Lon Hohberger <lon@redhat.com> - 1.1.2-1
- Initial packaging of pyasn1-lextudio