[packages/python-swagger-spec-validator] - initial

qboosh qboosh at pld-linux.org
Sun Dec 14 14:09:40 CET 2025


commit 6f4173638f9f882ae433bd3454f7e3ef52682d09
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Dec 14 14:09:53 2025 +0100

    - initial

 python-swagger-spec-validator.spec | 126 +++++++++++++++++++++++++++++++++++++
 1 file changed, 126 insertions(+)
---
diff --git a/python-swagger-spec-validator.spec b/python-swagger-spec-validator.spec
new file mode 100644
index 0000000..064ddba
--- /dev/null
+++ b/python-swagger-spec-validator.spec
@@ -0,0 +1,126 @@
+#
+# Conditional build:
+%bcond_with	tests	# unit tests (not in sdist)
+%bcond_without	python2 # CPython 2.x module
+%bcond_with	python3 # CPython 3.x module (built from python3-swagger-spec-validator.spec)
+
+Summary:	Validation of Swagger specifications
+Summary(pl.UTF-8):	Sprawdzanie poprawności specyfikacji Swagger
+Name:		python-swagger-spec-validator
+# keep 2.x here for python 2.7 support
+Version:	2.7.6
+Release:	1
+License:	Apache 2.0
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/swagger-spec-validator/
+Source0:	https://files.pythonhosted.org/packages/source/s/swagger-spec-validator/swagger-spec-validator-%{version}.tar.gz
+# Source0-md5:	c88b4c18bf7a9fdb9030c4490e8b2a18
+URL:		https://pypi.org/project/swagger-spec-validator/
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-PyYAML
+BuildRequires:	python-functools32
+BuildRequires:	python-jsonschema
+BuildRequires:	python-six
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.6
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-PyYAML
+BuildRequires:	python3-jsonschema
+BuildRequires:	python3-six
+%endif
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Swagger Spec Validator is a Python library that validates Swagger
+Specs against the Swagger 1.2 or Swagger 2.0 specification:
+<https://github.com/swagger-api/swagger-spec/blob/master/versions/>.
+The validator aims to check for full compliance with the
+Specification.
+
+%description -l pl.UTF-8
+Swagger Spec Validator to biblioteka Pythona sprawdzająca poprawność
+względem specyfikacji Swagger 1.2 lub Swagger 2.0:
+<https://github.com/swagger-api/swagger-spec/blob/master/versions/>.
+Celem walidatora jest sprawdzanie pełnej zgodności ze specyfikacją.
+
+%package -n python3-swagger-spec-validator
+Summary:	Validation of Swagger specifications
+Summary(pl.UTF-8):	Sprawdzanie poprawności specyfikacji Swagger
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.6
+
+%description -n python3-swagger-spec-validator
+Swagger Spec Validator is a Python library that validates Swagger
+Specs against the Swagger 1.2 or Swagger 2.0 specification:
+<https://github.com/swagger-api/swagger-spec/blob/master/versions/>.
+The validator aims to check for full compliance with the
+Specification.
+
+%description -n python3-swagger-spec-validator -l pl.UTF-8
+Swagger Spec Validator to biblioteka Pythona sprawdzająca poprawność
+względem specyfikacji Swagger 1.2 lub Swagger 2.0:
+<https://github.com/swagger-api/swagger-spec/blob/master/versions/>.
+Celem walidatora jest sprawdzanie pełnej zgodności ze specyfikacją.
+
+%prep
+%setup -q -n swagger-spec-validator-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+%{__python} -m ...
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+%{__python3} -m ...
+%endif
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.txt README.md
+%{py_sitescriptdir}/swagger_spec_validator
+%{py_sitescriptdir}/swagger_spec_validator-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-swagger-spec-validator
+%defattr(644,root,root,755)
+%doc LICENSE.txt README.md
+%{py3_sitescriptdir}/swagger_spec_validator
+%{py3_sitescriptdir}/swagger_spec_validator-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-swagger-spec-validator.git/commitdiff/6f4173638f9f882ae433bd3454f7e3ef52682d09



More information about the pld-cvs-commit mailing list