1 Commits

Author SHA256 Message Date
dadf1232c4 Convert to libalternatives, bsc#1245883 2025-11-03 14:54:59 +01:00
2 changed files with 11 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jul 8 08:33:25 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 29 15:25:57 UTC 2025 - Matej Cepl <mcepl@cepl.eu> Thu May 29 15:25:57 UTC 2025 - Matej Cepl <mcepl@cepl.eu>

View File

@@ -19,6 +19,7 @@
%define types_psutil_version 7.0.0.20250401 %define types_psutil_version 7.0.0.20250401
%define types_setuptools_version 78.1.0.20250329 %define types_setuptools_version 78.1.0.20250329
%bcond_without test %bcond_without test
%bcond_without libalternatives
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-mypy Name: python-mypy
Version: 1.16.0 Version: 1.16.0
@@ -41,14 +42,14 @@ BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tomli >= 1.1.0} BuildRequires: %{python_module tomli >= 1.1.0}
BuildRequires: %{python_module typing_extensions >= 4.6.0} BuildRequires: %{python_module typing_extensions >= 4.6.0}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-mypy_extensions >= 0.4.3 Requires: python-mypy_extensions >= 0.4.3
Requires: python-pathspec Requires: python-pathspec
Requires: python-typing_extensions >= 3.10 Requires: python-typing_extensions >= 3.10
Requires: (python-tomli >= 1.1.0 if python-base < 3.11) Requires: (python-tomli >= 1.1.0 if python-base < 3.11)
Requires(post): update-alternatives
Requires(postun): update-alternatives
Suggests: python-psutil >= 4.0 Suggests: python-psutil >= 4.0
BuildArch: noarch BuildArch: noarch
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3" %if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
@@ -115,6 +116,7 @@ rm docs/make.bat
%python_clone -a %{buildroot}%{_bindir}/mypyc %python_clone -a %{buildroot}%{_bindir}/mypyc
%python_clone -a %{buildroot}%{_bindir}/stubgen %python_clone -a %{buildroot}%{_bindir}/stubgen
%python_clone -a %{buildroot}%{_bindir}/stubtest %python_clone -a %{buildroot}%{_bindir}/stubtest
%python_group_libalternatives mypy dmypy mypyc stubgen stubtest
# solve "W: python-doc-in-package" in 3.9, 3.10 and 3.11, but not in 3.8 (thus -f to ignore the error) # solve "W: python-doc-in-package" in 3.9, 3.10 and 3.11, but not in 3.8 (thus -f to ignore the error)
%python_expand rm -rf %{buildroot}%{$python_sitelib}/mypyc/doc %python_expand rm -rf %{buildroot}%{$python_sitelib}/mypyc/doc
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -144,11 +146,8 @@ donttest+=" or PEP561Suite"
%pytest -n auto -k "not (testallexcept ${donttest})" %pytest -n auto -k "not (testallexcept ${donttest})"
%endif %endif
%post %pre
%python_install_alternative mypy dmypy mypyc stubgen stubtest %python_libalternatives_reset_alternative mypy
%postun
%python_uninstall_alternative mypy
%files %{python_files} %files %{python_files}
%doc docs/ %doc docs/