%{!?dotests: %define dotests 1} %define name python3-sphinxcontrib-jsmath %define srcname sphinxcontrib-jsmath %define version 1.0.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: Sphinx extension for math in HTML via JavaScript Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz Url: http://sphinx-doc.org/ License: BSD Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch BuildRequires: python3 >= 3.7.4 BuildRequires: python3-devel >= 3.7.4 BuildRequires: python3-pytest >= 5.3.1 BuildRequires: python3-sphinx >= 2.3.0 Requires: python3 >= 3.7.4 %description sphinxcontrib-jsmath is a sphinx extension which renders display math in HTML via JavaScript. %prep %setup -q -n %{srcname}-%{version} %build python3 setup.py build if [ "%{dotests}" == 1 ] then ( python3 setup.py test ) fi %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} %check if [ "%{dotests}" == 1 ] then ( python3 -m pytest ) fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license LICENSE %doc README.rst %{python_sitelib}/sphinxcontrib/ %{python_sitelib}/sphinxcontrib_jsmath-%{version}-py3.7-*.pth %{python_sitelib}/sphinxcontrib_jsmath-%{version}-py3.7.egg-info/ %changelog * Tue Dec 24 2019 Ashwini Chandrappa -1.0.1-1 - Initial build for AIX Toolbox