#Inorder to run testcase, pygments-ansi-color is required. For now, testcases are not being run. %{!?dotests: %define dotests 1} %define name python3-pygments-pytest %define srcname pygments-pytest %define version 1.3.1 %define release 1 %define is_python %(test -e /usr/bin/python3_32 && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(python3_32 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %endif %define _libdir64 %{_prefix}/lib64 %define is_python_64 %(test -e /usr/bin/python3 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %endif Summary: A pygments lexer for pytest output Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz Url: https://github.com/asottile/pygments-pytest License: MIT Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildRequires: python3 >= 3.7.4-1 BuildRequires: python3-devel >= 3.7.4-1 BuildRequires: python3-pytest >= 5.3.1-1 Requires: python3-pygments >= 2.4.2 BuildArch: noarch %description This library provides a pygments lexer called pytest. This library also provides a sphinx extension. %prep %setup -q -n %{srcname}-%{version} %build export OBJECT_MODE=64 python3 setup.py build %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT} %if %{dotests} %check python3 -m pytest -v || true %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc LICENSE README.md %{python_sitelib}/* %changelog * Mon Dec 30 2019 Reshma V Kumar - 1.3.1 - Initial port for AIX Toolbox