%global srcname pylero Name: python-%{srcname} Version: 0.0.4 Release: 1%{?dist} Summary: Python SDK for Polarion License: MIT URL: https://github.com/RedHatQE/pylero Source: %{url}/archive/%{version}/pylero-%{version}.tar.gz BuildArch: noarch %global _description %{expand: This is Pylero, the Python wrapper for the Polarion WSDL API. The Pylero wrapper enables native python access to Polarion objects and functionality using object oriented structure and functionality. This allows the devlopers to use Pylero in a natural fashion without being concerned about the Polarion details. All Pylero objects inherit from BasePolarion. The objects used in the library are all generated from the SOAP factory class, using the python-suds library. The Pylero class attributes are generated dynamically as properties, based on a mapping dict between the pylero naming convention and the Polarion attribute names. The use of properties allows the pylero object attributes to be virtual with no need for syncing between them and the Polarion objects they are based on. The Polarion WSDL API does not implement validation/verification of data passed in, so the Pylero library takes care of this itself. All enums are validated before being sent to the server and raise an error if not using a valid value. A number of workflow implementations are also included, for example when creating a Document, it automatically creates the Heading work item at the same time. Polarion Work Items are configured per installation, to give native workitem objects (such as TestCase), the library connects to the Polarion server, downloads the list of workitems and creates them.} %description %_description %package -n python3-%{srcname} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools # Require by test BuildRequires: python3-suds %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} %build %py3_build %install %py3_install %global _pylero_import_include %{expand:pylero.activity_comment pylero.activity pylero.approval pylero.attachment pylero.baseline pylero.build_test_results pylero.category pylero.change pylero.comment pylero.custom_field pylero.enum_custom_field_type pylero.exceptions pylero.properties pylero.property pylero.test_step pylero.tests_configuration pylero.user pylero.wiki_page pylero.work_record} %check # If the Polarion server URL is not specified in config some libraries will # fail to import, only test import on few modules don't depend on the URL %py3_check_import %{_pylero_import_include} %files -n python3-%{srcname} %doc README.md %license LICENSE %{python3_sitelib}/%{srcname}-*.egg-info/ %{python3_sitelib}/%{srcname}/ %{_bindir}/pylero-cmd %{_bindir}/pylero %changelog * Wed Dec 7 2022 Wayne Sun 0.0.4-1 - Initial packaging