Files
openRuyi/SPECS/python-pid/python-pid.spec
2026-03-10 10:23:24 +08:00

54 lines
1.4 KiB
RPMSpec

# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: misaka00251 <liuxin@iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0
%global srcname pid
Name: python-%{srcname}
Version: 3.0.4
Release: %autorelease
Summary: Pidfile featuring stale detection and file-locking, can also be used as context-manager or decorator
License: Apache-2.0
URL: https://github.com/trbs/pid
#!RemoteAsset
Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildSystem: pyproject
BuildOption(install): %{srcname}
BuildRequires: pyproject-rpm-macros
BuildRequires: pkgconfig(python3)
BuildRequires: python3dist(pytest)
Provides: python3-%{srcname}
%python_provide python3-%{srcname}
%description
pid provides a PidFile class that manages PID files. PidFile features:
- stale detection
- locking using fcntl
- chmod (default is 0o644)
- chown
- custom exceptions
PidFile can also be used as a context manager or a decorator.
%prep -a
rm -rf %{srcname}.egg-info
%generate_buildrequires
%pyproject_buildrequires
%check
%pytest
%files -f %{pyproject_files}
%doc AUTHORS CHANGELOG README.rst
%license LICENSE
%changelog
%{?autochangelog}