15
0
Files
python-concurrentloghandler/python-concurrentloghandler.spec

72 lines
2.2 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package python-concurrentloghandler
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
Update to 0.9.19: 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27 Fix accidental detection of 'darwin' (Mac OS) as Windows in setup.py 0.9.18: Remove ez_setup from the setup.py 0.9.17: Contains the following fixes: - Catch exceptions when unlocking the lock. - Clarify documentation, esp. with use of multiprocessing - In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<=1.7.1) 0.9.16: Fix publishing issue with incorrect code included in the wheel Affects Python 2 mainly - see Issue #21 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor Also, on Python 2 and 3, apply unicode_error_policy (default: ignore) to convert a log message to the output stream's encoding. I.e., by default it will filter out (remove) any characters in a log message which cannot be converted to the output logfile's encoding. 0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and terminator kwargs to allow customizing line ending behavior. Thanks to @vashek 0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking. Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts 0.9.12: Add umask option (thanks to @blakehilliard) This adds the ability to control the permission flags when OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-concurrentloghandler?expand=0&rev=12
2021-03-17 22:24:38 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Update to 0.9.19: 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27 Fix accidental detection of 'darwin' (Mac OS) as Windows in setup.py 0.9.18: Remove ez_setup from the setup.py 0.9.17: Contains the following fixes: - Catch exceptions when unlocking the lock. - Clarify documentation, esp. with use of multiprocessing - In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<=1.7.1) 0.9.16: Fix publishing issue with incorrect code included in the wheel Affects Python 2 mainly - see Issue #21 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor Also, on Python 2 and 3, apply unicode_error_policy (default: ignore) to convert a log message to the output stream's encoding. I.e., by default it will filter out (remove) any characters in a log message which cannot be converted to the output logfile's encoding. 0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and terminator kwargs to allow customizing line ending behavior. Thanks to @vashek 0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking. Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts 0.9.12: Add umask option (thanks to @blakehilliard) This adds the ability to control the permission flags when OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-concurrentloghandler?expand=0&rev=12
2021-03-17 22:24:38 +00:00
%define modname concurrent-log-handler
Name: python-concurrentloghandler
Update to 0.9.19: 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27 Fix accidental detection of 'darwin' (Mac OS) as Windows in setup.py 0.9.18: Remove ez_setup from the setup.py 0.9.17: Contains the following fixes: - Catch exceptions when unlocking the lock. - Clarify documentation, esp. with use of multiprocessing - In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<=1.7.1) 0.9.16: Fix publishing issue with incorrect code included in the wheel Affects Python 2 mainly - see Issue #21 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor Also, on Python 2 and 3, apply unicode_error_policy (default: ignore) to convert a log message to the output stream's encoding. I.e., by default it will filter out (remove) any characters in a log message which cannot be converted to the output logfile's encoding. 0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and terminator kwargs to allow customizing line ending behavior. Thanks to @vashek 0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking. Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts 0.9.12: Add umask option (thanks to @blakehilliard) This adds the ability to control the permission flags when OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-concurrentloghandler?expand=0&rev=12
2021-03-17 22:24:38 +00:00
Version: 0.9.19
Release: 0
Summary: Concurrent logging handler
License: Apache-2.0
Group: Development/Libraries/Python
Update to 0.9.19: 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27 Fix accidental detection of 'darwin' (Mac OS) as Windows in setup.py 0.9.18: Remove ez_setup from the setup.py 0.9.17: Contains the following fixes: - Catch exceptions when unlocking the lock. - Clarify documentation, esp. with use of multiprocessing - In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<=1.7.1) 0.9.16: Fix publishing issue with incorrect code included in the wheel Affects Python 2 mainly - see Issue #21 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor Also, on Python 2 and 3, apply unicode_error_policy (default: ignore) to convert a log message to the output stream's encoding. I.e., by default it will filter out (remove) any characters in a log message which cannot be converted to the output logfile's encoding. 0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and terminator kwargs to allow customizing line ending behavior. Thanks to @vashek 0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking. Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts 0.9.12: Add umask option (thanks to @blakehilliard) This adds the ability to control the permission flags when OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-concurrentloghandler?expand=0&rev=12
2021-03-17 22:24:38 +00:00
URL: https://github.com/Preston-Landers/concurrent-log-handler
Source: https://github.com/Preston-Landers/%{modname}/archive/%{version}.tar.gz#/%{modname}-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module portalocker}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: sed
Requires: python-portalocker
BuildArch: noarch
%python_subpackages
%description
This module 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.
%prep
Update to 0.9.19: 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27 Fix accidental detection of 'darwin' (Mac OS) as Windows in setup.py 0.9.18: Remove ez_setup from the setup.py 0.9.17: Contains the following fixes: - Catch exceptions when unlocking the lock. - Clarify documentation, esp. with use of multiprocessing - In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<=1.7.1) 0.9.16: Fix publishing issue with incorrect code included in the wheel Affects Python 2 mainly - see Issue #21 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor Also, on Python 2 and 3, apply unicode_error_policy (default: ignore) to convert a log message to the output stream's encoding. I.e., by default it will filter out (remove) any characters in a log message which cannot be converted to the output logfile's encoding. 0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and terminator kwargs to allow customizing line ending behavior. Thanks to @vashek 0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking. Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts 0.9.12: Add umask option (thanks to @blakehilliard) This adds the ability to control the permission flags when OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-concurrentloghandler?expand=0&rev=12
2021-03-17 22:24:38 +00:00
%autosetup -p1 -n %{modname}-%{version}
%build
export CFLAGS="%{optflags}"
%pyproject_wheel
%install
%pyproject_install
Update to 0.9.19: 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27 Fix accidental detection of 'darwin' (Mac OS) as Windows in setup.py 0.9.18: Remove ez_setup from the setup.py 0.9.17: Contains the following fixes: - Catch exceptions when unlocking the lock. - Clarify documentation, esp. with use of multiprocessing - In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<=1.7.1) 0.9.16: Fix publishing issue with incorrect code included in the wheel Affects Python 2 mainly - see Issue #21 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor Also, on Python 2 and 3, apply unicode_error_policy (default: ignore) to convert a log message to the output stream's encoding. I.e., by default it will filter out (remove) any characters in a log message which cannot be converted to the output logfile's encoding. 0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and terminator kwargs to allow customizing line ending behavior. Thanks to @vashek 0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking. Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts 0.9.12: Add umask option (thanks to @blakehilliard) This adds the ability to control the permission flags when OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-concurrentloghandler?expand=0&rev=12
2021-03-17 22:24:38 +00:00
# Remove files installed in wrong places
rm -rf %{buildroot}%{_usr}/{docs,tests}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
Update to 0.9.19: 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27 Fix accidental detection of 'darwin' (Mac OS) as Windows in setup.py 0.9.18: Remove ez_setup from the setup.py 0.9.17: Contains the following fixes: - Catch exceptions when unlocking the lock. - Clarify documentation, esp. with use of multiprocessing - In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<=1.7.1) 0.9.16: Fix publishing issue with incorrect code included in the wheel Affects Python 2 mainly - see Issue #21 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor Also, on Python 2 and 3, apply unicode_error_policy (default: ignore) to convert a log message to the output stream's encoding. I.e., by default it will filter out (remove) any characters in a log message which cannot be converted to the output logfile's encoding. 0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and terminator kwargs to allow customizing line ending behavior. Thanks to @vashek 0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking. Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts 0.9.12: Add umask option (thanks to @blakehilliard) This adds the ability to control the permission flags when OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-concurrentloghandler?expand=0&rev=12
2021-03-17 22:24:38 +00:00
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
rm -rf test_output
$python stresstest.py
Update to 0.9.19: 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27 Fix accidental detection of 'darwin' (Mac OS) as Windows in setup.py 0.9.18: Remove ez_setup from the setup.py 0.9.17: Contains the following fixes: - Catch exceptions when unlocking the lock. - Clarify documentation, esp. with use of multiprocessing - In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<=1.7.1) 0.9.16: Fix publishing issue with incorrect code included in the wheel Affects Python 2 mainly - see Issue #21 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor Also, on Python 2 and 3, apply unicode_error_policy (default: ignore) to convert a log message to the output stream's encoding. I.e., by default it will filter out (remove) any characters in a log message which cannot be converted to the output logfile's encoding. 0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and terminator kwargs to allow customizing line ending behavior. Thanks to @vashek 0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking. Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts 0.9.12: Add umask option (thanks to @blakehilliard) This adds the ability to control the permission flags when OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-concurrentloghandler?expand=0&rev=12
2021-03-17 22:24:38 +00:00
}
%files %{python_files}
%license LICENSE
Update to 0.9.19: 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27 Fix accidental detection of 'darwin' (Mac OS) as Windows in setup.py 0.9.18: Remove ez_setup from the setup.py 0.9.17: Contains the following fixes: - Catch exceptions when unlocking the lock. - Clarify documentation, esp. with use of multiprocessing - In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<=1.7.1) 0.9.16: Fix publishing issue with incorrect code included in the wheel Affects Python 2 mainly - see Issue #21 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor Also, on Python 2 and 3, apply unicode_error_policy (default: ignore) to convert a log message to the output stream's encoding. I.e., by default it will filter out (remove) any characters in a log message which cannot be converted to the output logfile's encoding. 0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and terminator kwargs to allow customizing line ending behavior. Thanks to @vashek 0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking. Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts 0.9.12: Add umask option (thanks to @blakehilliard) This adds the ability to control the permission flags when OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-concurrentloghandler?expand=0&rev=12
2021-03-17 22:24:38 +00:00
%doc README.md
%{python_sitelib}/concurrent_log_handler
%{python_sitelib}/concurrent_log_handler-%{version}*-info
%changelog