%{!?dotests: %define dotests 1} %define name python3-zc.lockfile %define srcname zc.lockfile %define version 2.0 %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: Basic Inter-Process Locks Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz Url: https://pypi.io/project/zc.lockfile/ License: ZPLv2.1 Group: Development/Libraries Prefix: %{_prefix} BuildArch: noarch BuildRequires: python3 >= 3.7.3 BuildRequires: python3-devel >= 3.7.3 Requires: python3 >= 3.7.3 %description The zc.lockfile package provides a basic portable implementation of interprocess locks using lock files. The purpose if not specifically to lock files, but to simply provide locks with an implementation based on file-locking primitives. Of course, these locks could be used to mediate access to other files. For example, the ZODB file storage implementation uses file locks to mediate access to file-storage database files. The database files and lock file files are separate files. %prep %setup -q -n %{srcname}-%{version} %build python3 setup.py build %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} if [ "%{dotests}" == 1 ] then (python3 setup.py test || true) fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc COPYRIGHT.txt LICENSE.txt %{python_sitelib}/* %changelog * Thu Dec 12 2019 Baanu Tumma - 2.0-1 - Initial build for AIX Toolbox, built using python3