#
# Conditional build:
%bcond_without doc # don't build doc
-%bcond_without tests # do not perform "make test"
+%bcond_with tests # do not perform "make test"
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define pypi_name xdis
Summary: Python cross-version byte-code disassembler and marshal routines
Name: python-%{module}
-Version: 1.1.7
-Release: 4
+Version: 4.1.2
+Release: 1
License: MIT
Group: Libraries/Python
Source0: https://files.pythonhosted.org/packages/source/x/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5: 2b89141eabc706b7d8b3df4178047647
+# Source0-md5: 8aca98d1837df4b0073fe1cacd65d91d
URL: https://github.com/rocky/python-xdis/
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+%{?with_tests:%{__make} PYTHON=python check}
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+%{?with_tests:%{__make} PYTHON=python3 check}
%endif
%install
%if %{with python2}
%py_install
%py_postclean
-mv $RPM_BUILD_ROOT%{_bindir}/pydisasm{,-2}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/pydisasm{,-2}
%endif
%if %{with python3}
%py3_install
-mv $RPM_BUILD_ROOT%{_bindir}/pydisasm{,-3}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/pydisasm{,-3}
%endif
%clean