69 lines
2.5 KiB
RPMSpec
69 lines
2.5 KiB
RPMSpec
#
|
|
# spec file for package python-pySMART
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define skip_python311 1
|
|
%define skip_python312 1
|
|
%define short_name_nocaps pysmart
|
|
|
|
Name: python-pySMART
|
|
Version: 1.4.2
|
|
Release: 0
|
|
Summary: Wrapper for smartctl (smartmontools)
|
|
License: LGPL-2.1
|
|
URL: https://github.com/truenas/py-SMART
|
|
Source: https://files.pythonhosted.org/packages/source/p/pySMART/pysmart-%{version}.tar.gz
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
Requires: python3-chardet
|
|
Requires: python3-humanfriendly
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
pySMART is a simple Python wrapper for the `smartctl` component of
|
|
`smartmontools`. It is officially compatible with Linux, Windows and FreeBSD,
|
|
as long as smartctl is on the system path. Running with administrative rights
|
|
is strongly recommended, as smartctl cannot accurately detect all device types
|
|
or parse all SMART information without these permissions.
|
|
|
|
With only a device's name (ie: /dev/sda, pd0), the package will create a
|
|
`Device` object, populated with all relevant information about that
|
|
device. The documented API can then be used to query this object for
|
|
information, initiate self-tests, and perform other functions.
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{short_name_nocaps}-%{version}
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
### 20241227: Not sure why it does pySMART-0.0.0.dist-info otherwise
|
|
%python_expand mv -v %{buildroot}%{$python_sitelib}/%{short_name_nocaps}-0.0.0.dist-info %{buildroot}%{$python_sitelib}/%{short_name_nocaps}-%{version}.dist-info
|
|
#####
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%files %{python_files}
|
|
%{python_sitelib}/pySMART
|
|
%{python_sitelib}/%{short_name_nocaps}-%{version}.dist-info
|
|
|
|
%changelog
|