Blob Blame History Raw
%global srcname pcodedmp

# No python-pypandoc packages in EPEL 8 (yet?)
%if 0%{?fedora} || 0%{?rhel} == 7
%bcond_without  pypandoc
%bcond_with     pypandoc

Summary:        VBA p-code disassembler
Name:           python-%{srcname}
Version:        1.2.6
Release:        7%{?dist}
License:        GPLv3+
Source0:        %{pypi_source}
Patch0:         python-pcodedmp-1.2.6-python27.patch
BuildArch:      noarch

%global _description %{expand:
Macros written in VBA (Visual Basic for Applications; the macro programming
language used in Microsoft Office) exist in three different executable forms,
each of which can be what is actually executed at run time, depending on the
circumstances: Source code, p-code and execodes.

Since most of the time it is the p-code that determines what exactly a macro
would do (even if neither source code, nor execodes are present), pcodedmp is
a Python library and command line tool to display it.}

%description %_description

%package -n %{srcname}
Summary:        %{summary}
Requires:       python%{python3_pkgversion}-%{srcname} = %{version}-%{release}

%description -n %{srcname} %_description

%if 0%{?rhel} && 0%{?rhel} < 8
%package -n python2-%{srcname}
Summary:        %{summary}
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
%if %{with pypandoc}
BuildRequires:  python2-pypandoc
BuildRequires:  python2-oletools >= 0.54
Requires:       python2-oletools >= 0.54
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname} %_description

%package -n python%{python3_pkgversion}-%{srcname}
Summary:        %{summary}
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools
%if %{with pypandoc}
BuildRequires:  python%{python3_pkgversion}-pypandoc
BuildRequires:  python%{python3_pkgversion}-lxml
BuildRequires:  python%{python3_pkgversion}-oletools >= 0.54
Requires:       python%{python3_pkgversion}-oletools >= 0.54
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

%description -n python%{python3_pkgversion}-%{srcname} %_description

%if 0%{?with_python3_other}
%package -n python%{python3_other_pkgversion}-%{srcname}
Summary:        %{summary}
BuildRequires:  python%{python3_other_pkgversion}-devel
BuildRequires:  python%{python3_other_pkgversion}-setuptools
%if %{with pypandoc}
BuildRequires:  python%{python3_other_pkgversion}-pypandoc
BuildRequires:  python%{python3_other_pkgversion}-lxml
BuildRequires:  python%{python3_other_pkgversion}-oletools >= 0.54
Requires:       python%{python3_other_pkgversion}-oletools >= 0.54
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{srcname}}

%description -n python%{python3_other_pkgversion}-%{srcname} %_description

%autosetup -n %{srcname}-%{version}

%if 0%{?rhel} && 0%{?rhel} < 8

%if 0%{?rhel} && 0%{?rhel} < 8

%{__python3} test
%{?with_python3_other:%{__python3_other} test}

%files -n %{srcname}

%if 0%{?rhel} && 0%{?rhel} < 8
%files -n python2-%{srcname}
%license LICENSE

%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE

%if 0%{?with_python3_other}
%files -n python%{python3_other_pkgversion}-%{srcname}
%license LICENSE

* Fri Jun 04 2021 Python Maint <> - 1.2.6-7
- Rebuilt for Python 3.10

* Fri Jun 04 2021 Python Maint <> - 1.2.6-6
- Bootstrap for Python 3.10

* Wed Jan 27 2021 Fedora Release Engineering <> - 1.2.6-5
- Rebuilt for

* Wed Jul 29 2020 Fedora Release Engineering <> - 1.2.6-4
- Rebuilt for

* Mon Jun 29 2020 Robert Scheck <> 1.2.6-3
- Require python-setuptools during build-time explicitly

* Tue May 26 2020 Miro HronĨok <> - 1.2.6-2
- Rebuilt for Python 3.9

* Mon May 04 2020 Robert Scheck <> 1.2.6-1
- Upgrade to 1.2.6 (#1832610)
- Initial spec file for Fedora and Red Hat Enterprise Linux