%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} %{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} Name: python-ConcurrentLogHandler Version: 0.9.1 Release: 1%{?dist} Summary: Concurrent logging handler (drop-in replacement for RotatingFileHandler) Python 2.6+ License: Apache-2.0 Group: Development/Languages/Python Url: https://pypi.python.org/pypi/ConcurrentLogHandler/0.9.1 Source0: ConcurrentLogHandler-%{version}.tar.gz %define sha1 ConcurrentLogHandler=9afcd87b6eb0f37f65b8d7eb928c6d20415692ab Vendor: VMware, Inc. Distribution: Photon BuildRequires: python2 BuildRequires: python2-libs BuildRequires: python-setuptools BuildRequires: python-pytest Requires: python2 Requires: python2-libs Requires: python-setuptools BuildArch: noarch %description ConcurrentLogHandler is a module that provides an additional log handler for Python’s standard logging package (PEP 282). This handler will write log events to log file which is rotated when the log file reaches a certain size. Multiple processes can safely write to the same log file concurrently. %package -n python3-ConcurrentLogHandler Summary: python-ConcurrentLogHandler BuildRequires: python3 BuildRequires: python3-devel BuildRequires: python3-libs BuildRequires: python3-tools BuildRequires: python3-pytest Requires: python3 Requires: python3-libs Requires: python3-tools %description -n python3-ConcurrentLogHandler Python 3 version. %prep %setup -n ConcurrentLogHandler-%{version} rm -rf ../p3dir cp -a . ../p3dir %build python2 setup.py build pushd ../p3dir python3 setup.py build popd %install pushd ../p3dir python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} popd python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} #No test case available for this package %files %defattr(-,root,root,-) %{python_sitelib}/* %doc /usr/docs/LICENSE %doc /usr/docs/README %exclude /usr/tests/stresstest.py %files -n python3-ConcurrentLogHandler %defattr(-,root,root,-) %{python3_sitelib}/* %exclude /usr/tests/stresstest.py %changelog * Fri Oct 13 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.9.1-1 - python ConcurrentLogHandler for PhotonOS.