[packages/python-flex] - new

qboosh qboosh at pld-linux.org
Sat Dec 13 20:49:16 CET 2025


commit add311d94aaac4d10d94b04b8fdcd9894b92ee87
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Dec 13 20:49:28 2025 +0100

    - new

 python-flex.spec | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 134 insertions(+)
---
diff --git a/python-flex.spec b/python-flex.spec
new file mode 100644
index 0000000..f64244f
--- /dev/null
+++ b/python-flex.spec
@@ -0,0 +1,134 @@
+#
+# Conditional build:
+%bcond_with	tests	# unit tests (not in sdist)
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+Summary:	Swagger Schema validation
+Summary(pl.UTF-8):	Sprawdzanie poprawności schematów Swagger
+Name:		python-flex
+Version:	6.14.1
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/flex/
+Source0:	https://files.pythonhosted.org/packages/source/f/flex/flex-%{version}.tar.gz
+# Source0-md5:	feb33e1dfda50945b04fba409119cce4
+URL:		https://pypi.org/project/flex/
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-PyYAML >= 3.11
+BuildRequires:	python-click >= 3.3
+BuildRequires:	python-jsonpointer >= 1.7
+BuildRequires:	python-requests >= 2.4.3
+BuildRequires:	python-rfc3987 >= 1.3.4
+BuildRequires:	python-six >= 1.7.3
+BuildRequires:	python-strict_rfc3339 >= 0.7
+BuildRequires:	python-validate_email >= 1.2
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.3
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-PyYAML >= 3.11
+BuildRequires:	python3-click >= 3.3
+BuildRequires:	python3-jsonpointer >= 1.7
+BuildRequires:	python3-requests >= 2.4.3
+BuildRequires:	python3-rfc3987 >= 1.3.4
+BuildRequires:	python3-six >= 1.7.3
+BuildRequires:	python3-strict_rfc3339 >= 0.7
+BuildRequires:	python3-validate_email >= 1.2
+%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
+Validation tooling for Swagger 2.0 specifications:
+<https://github.com/wordnik/swagger-spec/blob/master/versions/2.0.md>.
+
+%description -l pl.UTF-8
+Narzędzia do sprawdzania poprawności względem specyfikacji Swagger
+2.0:
+<https://github.com/wordnik/swagger-spec/blob/master/versions/2.0.md>.
+
+%package -n python3-flex
+Summary:	Swagger Schema validation
+Summary(pl.UTF-8):	Sprawdzanie poprawności schematów Swagger
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.3
+
+%description -n python3-flex
+Validation tooling for Swagger 2.0 specifications:
+<https://github.com/wordnik/swagger-spec/blob/master/versions/2.0.md>.
+
+%description -n python3-flex -l pl.UTF-8
+Narzędzia do sprawdzania poprawności względem specyfikacji Swagger
+2.0:
+<https://github.com/wordnik/swagger-spec/blob/master/versions/2.0.md>.
+
+%prep
+%setup -q -n flex-%{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
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/swagger-flex{,-2}
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/swagger-flex{,-3}
+ln -sf swagger-flex-3 $RPM_BUILD_ROOT%{_bindir}/swagger-flex
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%attr(755,root,root) %{_bindir}/swagger-flex-2
+%{py_sitescriptdir}/flex
+%{py_sitescriptdir}/flex-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-flex
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%attr(755,root,root) %{_bindir}/swagger-flex-3
+%{_bindir}/swagger-flex
+%{py3_sitescriptdir}/flex
+%{py3_sitescriptdir}/flex-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-flex.git/commitdiff/add311d94aaac4d10d94b04b8fdcd9894b92ee87



More information about the pld-cvs-commit mailing list