17
0
Files
python-pan-python/python-pan-python.spec
Dirk Mueller 43892cb9aa - update to 0.25.0:
* Support vsys for import_file().
  * pan.xapi.py: In import_file() use dummy string for filename
    when not specified and file is bytes; it's a required
    argument.
  * tests/test_xapi_fw_pano_import.py: Fix so test_01 is run and
    works with Panorama.
  * tests/test_wfapi_cld_web_artifacts.py: Update URL, 0.0.0.0
    now has 404 status.
  * tests/test_wfapi_cld_submit_url.py: Wait up to 300 seconds
    for report to be available.
  * tests/test_wfapi_cld_appl_verdict.py: Fix test_04 to work
    until bug fixed.
  * tests/wfapi_mixin.py: commit missing test file.
  * Add support for type=import API request.
  * Rename test filename, log() method does not support Panorama
    to device redirection.
  * Use 11.1 documentation links.
  * pan.xapi, pan.xapi.rst, panxapi.rst: Modified version of
    https://github.com/kevinsteves/pan-python/pull/54 from
    Matthew Kazmar. type=export request supports target argument.
  * tests/test_xapi_fw_tgt_multi_config.py: PAN-196392 is fixed.
  * tests/test_xapi_fw_tgt_multi_config.py: Error message
    changed.
  * pan.config: Support 11.1.0 config for set format.
  * pan.config: Support 11.0.0 config for set format.
  * pan.wfapi: Add C2 verdict.
  * pan.wfapi, pan.rc: Add agent argument to constructor.  Agent
    is used to specify the API key type for Prisma API keys.  Can
    be specified in .panrc; no command line argument at this

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pan-python?expand=0&rev=12
2025-09-29 20:21:36 +00:00

94 lines
3.2 KiB
RPMSpec

#
# spec file for package python-pan-python
#
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2017-2019, Martin Hauke <mardnh@gmx.de>
#
# 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/
#
%bcond_without libalternatives
Name: python-pan-python
Version: 0.25.0
Release: 0
Summary: Multi-tool set for Palo Alto Networks PAN-OS, Panorama, WildFire and AutoFocus
License: ISC
Group: Development/Languages/Python
URL: https://github.com/kevinsteves/pan-python
Source: https://files.pythonhosted.org/packages/source/p/pan-python/pan-python-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
BuildArch: noarch
# SECTION test requirements
#BuildRequires: %%{python_module pytest}
# /SECTION
%python_subpackages
%description
pan-python is a Python package for Palo Alto Networks' Next-Generation
Firewalls, WildFire and AutoFocus. It provides:
- a Python and command line interface to the PAN-OS and Panorama XML API
- a command line program for managing PAN-OS XML configurations
- a Python and command line interface to the WildFire API
- a Python and command line interface to the AutoFocus API
%prep
%setup -q -n pan-python-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
# remove .py suffix from binaries
cd %{buildroot}/%{_bindir}
for f in panxapi panconf panlicapi panwfapi panafapi; do mv "$f.py" "$f"; done
#
%python_clone -a %{buildroot}%{_bindir}/panxapi
%python_clone -a %{buildroot}%{_bindir}/panwfapi
%python_clone -a %{buildroot}%{_bindir}/panlicapi
%python_clone -a %{buildroot}%{_bindir}/panconf
%python_clone -a %{buildroot}%{_bindir}/panafapi
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# remove unneeded files
rm -f %{buildroot}%{_bindir}/_current_flavor
%check
# Upstream does not have any tests yet
#%%pytest
%pre
%python_libalternatives_reset_alternative panxapi
%python_libalternatives_reset_alternative panwfapi
%python_libalternatives_reset_alternative panlicapi
%python_libalternatives_reset_alternative panconf
%python_libalternatives_reset_alternative panafapi
%files %{python_files}
%license LICENSE.txt
%doc AUTHORS.rst HISTORY.rst README.rst
%python_alternative %{_bindir}/panafapi
%python_alternative %{_bindir}/panconf
%python_alternative %{_bindir}/panlicapi
%python_alternative %{_bindir}/panwfapi
%python_alternative %{_bindir}/panxapi
%{python_sitelib}/pan
%{python_sitelib}/pan[-_]python-%{version}*-info
%changelog