forked from pool/python-pywbemtools
- Update to 1.3.0 ## Incompatible changes: * Dropped support for Python 3.5 (issue #1308) * Installation of this package using “setup.py” is no longer supported. Use “pip” instead. * Update to pywbemtools version 1.3.0 requires pywbem version >= 1.7.2 which allows urllib3 version >= 2.0. This may result in issues with SSL because urllib3 may require support of TLS protocol version >= 1.2 possibly resulting in exceptions such as the following: SSLError(1, ‘[SSL: UNSUPPORTED_PROTOCOL] unsupported protocol …) or NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+ * See pywbem troubleshooting documentation. for help resolving such issues. ## Bug fixes: * Increased pywbem to 1.7.2 to pick up fixes. (issue #1304) * Addressed safety issues up to 2024-03-25. * Fixed coveralls issues with KeyError and HTTP 422 Unprocessable Entity. * Disallow the use of the click_repl version 3.0 because it cannot process general options and causes a significant number of CLI tests to fail. (issue #1312) * Circumvented the removal of Python 2.7 from the Github Actions plugin setup-python, by using the Docker container python:2.7.18-buster instead. * Fixed issue with PyYAML 5.4 installation on Python>=3.10 that fails since the recent release of Cython 3. * Correct issue in tab completion for –name argument and option where nvalid co:nnection file could cause exception. Changes messages issued for error to warning. This eliminates most tests of pywbemlistener but only with Python 2.7 and that version of Python is deprecated (see issue #1316) OBS-URL: https://build.opensuse.org/request/show/1224498 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:wbem/python-pywbemtools?expand=0&rev=12
122 lines
4.1 KiB
RPMSpec
122 lines
4.1 KiB
RPMSpec
#
|
|
# spec file for package python-pywbemtools
|
|
#
|
|
# Copyright (c) 2024 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/
|
|
#
|
|
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
%if "%{flavor}" == "test"
|
|
%define psuffix -test
|
|
%bcond_without test
|
|
%else
|
|
%define psuffix %{nil}
|
|
%bcond_with test
|
|
%endif
|
|
|
|
Name: python-pywbemtools
|
|
Version: 1.3.0
|
|
Release: 0
|
|
Summary: Python client tools to work with WBEM Servers using the PyWBEM API
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/pywbem/pywbemtools
|
|
# The PyPI archive does not contain the tests
|
|
Source: https://github.com/pywbem/pywbemtools/archive/%{version}.tar.gz#/pywbemtools-%{version}-gh.tar.gz
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-PyYAML >= 5.3.1
|
|
Requires: python-asciitree >= 0.3.3
|
|
Requires: python-click >= 8.0.2
|
|
Requires: python-click-repl >= 0.2
|
|
Requires: python-nocasedict >= 1.0.1
|
|
Requires: python-nocaselist >= 1.0.3
|
|
Requires: python-packaging >= 21.0
|
|
Requires: python-prompt_toolkit >= 3.0.13
|
|
Requires: python-pyparsing >= 2.3.1
|
|
Requires: python-pywbem >= 1.7.2
|
|
Requires: python-toposort >= 1.6
|
|
Requires: python-urllib3 >= 1.26.18
|
|
Requires: python-yamlloader >= 0.5.5
|
|
Requires: (python-click-spinner >= 0.1.8 if python-base < 3.12 else python-click-spinner >= 0.1.10)
|
|
Requires: (python-psutil >= 5.5.0 if python-base < 3.10 else python-psutil >= 5.8.0)
|
|
Requires: (python-six >= 1.14.0 if python-base < 3.10 else python-six >= 1.16.0)
|
|
Requires: (python-tabulate >= 0.8.2 if python-base < 3.10 else python-tabulate >= 0.8.8)
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
BuildArch: noarch
|
|
%if !%{with test}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module wheel}
|
|
%else
|
|
BuildRequires: %{python_module pytest}
|
|
# tests require entrypoint in standard path
|
|
BuildRequires: %{python_module pywbemtools = %{version}}
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
Pywbemtools is a collection of command line tools that communicate with WBEM
|
|
servers. The tools are written in pure Python and support Python 2 and Python
|
|
3.
|
|
|
|
At this point, pywbemtools includes a single command line tool named
|
|
pywbemcli that uses the python-pywbem package to issue operations to a
|
|
WBEM server using the CIM/WBEM standards defined by the DMTF to perform
|
|
system management tasks.
|
|
|
|
%prep
|
|
%autosetup -p1 -n pywbemtools-%{version}
|
|
# remove old mock
|
|
sed -i '/mock/ d' requirements.txt
|
|
sed -i 's/from mock import/from unittest.mock import/' tests/unit/pywbemcli/*.py
|
|
sed -i 's/^import mock/from unittest import mock/' tests/unit/test_utils.py pywbemtools/_utils.py
|
|
|
|
%if !%{with test}
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_clone -a %{buildroot}%{_bindir}/pywbemcli
|
|
%python_clone -a %{buildroot}%{_bindir}/pywbemlistener
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%else
|
|
|
|
%check
|
|
# increase virtual terminal size to avoid unexpected line breaks
|
|
export PYWBEMTOOLS_TERMWIDTH=120
|
|
# too many cli tests not compatible with click-repl 0.3: https://github.com/pywbem/pywbemtools/issues/1312
|
|
donttest="pywbemcli"
|
|
%pytest tests/unit -s -k "not ($donttest)"
|
|
%endif
|
|
|
|
%if !%{with test}
|
|
%post
|
|
%python_install_alternative pywbemcli pywbemlistener
|
|
|
|
%postun
|
|
%python_uninstall_alternative pywbemcli
|
|
|
|
%files %{python_files}
|
|
%python_alternative %{_bindir}/pywbemcli
|
|
%python_alternative %{_bindir}/pywbemlistener
|
|
%{python_sitelib}/pywbemtools
|
|
%{python_sitelib}/pywbemtools-%{version}.dist-info
|
|
%endif
|
|
|
|
%changelog
|