Sync from SUSE:SLFO:Main python-flex revision 6a51254157483b1d864a1b1f4deea574

This commit is contained in:
Adrian Schröter 2024-05-03 20:42:06 +02:00
commit 6c8fafd2ad
4 changed files with 163 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

44
python-flex.changes Normal file
View File

@ -0,0 +1,44 @@
-------------------------------------------------------------------
Fri Apr 21 12:25:13 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Thu Apr 13 22:41:19 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Make calling of %{sle15modernpython} optional.
-------------------------------------------------------------------
Wed Apr 27 13:41:23 UTC 2022 - Markéta Machová <mmachova@suse.com>
- Remove pytest-pythonpath and fix build
-------------------------------------------------------------------
Sun Aug 29 22:33:20 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Problems with gh#pipermerriam/flex#234 are not isolated just to
Python 3.9.
-------------------------------------------------------------------
Sun May 16 13:32:39 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Skip a failing test on Python 3.9.5: request url with tabs
gh#pipermerriam/flex#234
- Skip python2 because it fails on Leap: factory_boy does not
support Python 2 anymore
-------------------------------------------------------------------
Thu Sep 17 06:45:02 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 6.14.1:
* Fixed all warnings about importing from collections on Python 3
-------------------------------------------------------------------
Tue May 26 06:34:16 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
-------------------------------------------------------------------
Thu Mar 14 12:12:22 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Initial commit, needed by flasgger

93
python-flex.spec Normal file
View File

@ -0,0 +1,93 @@
#
# spec file for package python-flex
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Python 2 is not supported by factory_boy anymore
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-flex
Version: 6.14.1
Release: 0
Summary: Swagger Schema validation
License: MIT
Group: Development/Languages/Python
URL: https://github.com/pipermerriam/flex
Source: https://github.com/pipermerriam/flex/archive/v%{version}.tar.gz
BuildRequires: %{python_module PyYAML >= 3.11}
BuildRequires: %{python_module click >= 3.3}
BuildRequires: %{python_module factory_boy >= 2.4.1}
BuildRequires: %{python_module jsonpointer >= 1.7}
BuildRequires: %{python_module pytest-httpbin}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 2.4.3}
BuildRequires: %{python_module responses >= 0.5.1}
BuildRequires: %{python_module rfc3987 >= 1.3.4}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.7.3}
BuildRequires: %{python_module strict-rfc3339 >= 0.7}
BuildRequires: %{python_module validate_email >= 1.2}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-PyYAML >= 3.11
Requires: python-click >= 3.3
Requires: python-jsonpointer >= 1.7
Requires: python-requests >= 2.4.3
Requires: python-rfc3987 >= 1.3.4
Requires: python-six >= 1.7.3
Requires: python-strict-rfc3339 >= 0.7
Requires: python-validate_email >= 1.2
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
%description
Validation tooling for Swagger 2.0 specifications.
%prep
%setup -q -n flex-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/swagger-flex
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
PYTHONPATH=.
# gh#pipermerriam/flex#236
sed -i 's/werkzeug.wrappers.BaseRequest/werkzeug.wrappers.Request/' flex/http.py
sed -i 's/werkzeug.wrappers.BaseResponse/werkzeug.wrappers.Response/' flex/http.py
# gh#pipermerriam/flex#234
%pytest -k "not (donttestdummyprefix or (test_request_parameter_array_extraction and tsv))"
%post
%python_install_alternative swagger-flex
%postun
%python_uninstall_alternative swagger-flex
%files %{python_files}
%license LICENSE
%doc CHANGELOG README.md
%{python_sitelib}/*
%python_alternative %{_bindir}/swagger-flex
%changelog

BIN
v6.14.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.