## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond_without tests Name: python-openapi-schema-validator Version: 0.4.3 Release: %autorelease Summary: OpenAPI schema validator for Python License: BSD-3-Clause URL: https://github.com/p1c2u/openapi-schema-validator # The GitHub tarball contains tests; the PyPI sdist does not. Source0: %{url}/archive/%{version}/openapi-schema-validator-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel %if %{with tests} # See [tool.poetry.dev-dependencies] in pyproject.toml, which also includes # coverage/formatter/linter/typechecker type dependencies that we do not need # or want. Upstream pins a major version of pytest, but we do not have that # luxury. BuildRequires: python3dist(pytest) >= 6 %endif %global common_description %{expand: Openapi-schema-validator is a Python library that validates schema against: • OpenAPI Schema Specification v3.0 which is an extended subset of the JSON Schema Specification Wright Draft 00. • OpenAPI Schema Specification v3.1 which is an extended superset of the JSON Schema Specification Draft 2020-12.} %description %{common_description} %package -n python3-openapi-schema-validator Summary: %{summary} # This extra was removed upstream in 0.4.3. Obsoletes: python3-openapi-schema-validator+rfc3339-validator < 0.4.3-0 # These extras were removed upstream in 0.4.2. Obsoletes: python3-openapi-schema-validator+strict-rfc3339 < 0.4.2-0 Obsoletes: python3-openapi-schema-validator+isodate < 0.4.2-0 %description -n python3-openapi-schema-validator %{common_description} %prep %autosetup -n openapi-schema-validator-%{version} # Patch coverage analysis out of [tool.pytest.ini_options]: # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters sed -r -i '/^--cov\b/d' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files openapi_schema_validator %check %if %{with tests} %pytest %else %pyproject_check_import %endif %files -n python3-openapi-schema-validator -f %{pyproject_files} %license LICENSE %doc README.rst %changelog * Thu Feb 02 2023 Benjamin A. Beasley 0.4.3-1 - Update to 0.4.3 * Tue Jan 31 2023 Benjamin A. Beasley 0.4.2-1 - Update to 0.4.2 (close RHBZ#2165753) * Thu Jan 26 2023 Benjamin A. Beasley 0.4.1-1 - Update to 0.4.1 (close RHBZ#2164681) * Fri Jan 20 2023 Fedora Release Engineering 0.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jan 13 2023 Benjamin A. Beasley 0.4.0-1 - Update to 0.4.0 (close RHBZ#2160783) * Wed Sep 14 2022 Benjamin A. Beasley 0.3.4-1 - Update to 0.3.4 (close RHBZ#2123908) * Fri Aug 26 2022 Benjamin A. Beasley 0.3.1-1 - Update to 0.3.1 (RHBZ#2121823) * Fri Aug 26 2022 Benjamin A. Beasley 0.3.0-3 - Update License to SPDX * Fri Jul 22 2022 Fedora Release Engineering 0.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jul 06 2022 Benjamin A. Beasley 0.3.0-1 - Initial package (close RHBZ#2095974)