diff --git a/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec b/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec index 2dfbf3d923..89e4666c5b 100644 --- a/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec +++ b/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec @@ -85,7 +85,11 @@ Examples for Lomiri-ui-toolkit. %build %{qmake_qt5} 'CONFIG+=ubuntu-uitk-compat' 'CONFIG+=test' pushd tests/autopilot +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif popd %make_build @@ -97,7 +101,11 @@ rm -rf %{buildroot}%{_qt5_qmldir}/Extinct %fdupes %buildroot%_libdir/qt5/examples/%name/examples/ pushd tests/autopilot +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif mv lomiriuitoolkit/{tests,_custom_proxy_objects} -t %{buildroot}%{python3_sitelib}/lomiriuitoolkit/ popd @@ -147,7 +155,11 @@ popd %{python3_sitelib}/lomiriuitoolkit/_custom_proxy_objects/ %{python3_sitelib}/lomiriuitoolkit/__pycache__/ %{python3_sitelib}/lomiriuitoolkit/tests/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/lomiriuitoolkit-%{version}-py%{python3_version}.egg-info/ +%else %{python3_sitelib}/lomiriuitoolkit-%{version}.dist-info/ +%endif %files doc %license COPYING.CC-BY-SA-3.0 diff --git a/anda/devs/shibuya/python-shibuya.spec b/anda/devs/shibuya/python-shibuya.spec index 1913c7225e..0d157afa5e 100644 --- a/anda/devs/shibuya/python-shibuya.spec +++ b/anda/devs/shibuya/python-shibuya.spec @@ -27,6 +27,7 @@ BuildRequires: python3dist(myst-parser) BuildRequires: python3dist(shibuya) BuildRequires: python3dist(sphinx-copybutton) BuildRequires: python3dist(sphinx-design) +BuildRequires: python3dist(sphinx-togglebutton) %endif BuildArch: noarch Packager: Gilver E. @@ -75,7 +76,11 @@ This package contains the official docs for Shibuya. rm -rf %{pypi_name}.egg-info %build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif %if %{with docs} sphinx-build docs build/_html -b dirhtml -a @@ -88,13 +93,21 @@ done %endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{python3_sitelib}/%{pypi_name} +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else %{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif %if %{with docs} %files -n python3-%{pypi_name}-doc diff --git a/anda/langs/python/colorz/python-colorz.spec b/anda/langs/python/colorz/python-colorz.spec index 2e0ab064c2..5dd228c483 100644 --- a/anda/langs/python/colorz/python-colorz.spec +++ b/anda/langs/python/colorz/python-colorz.spec @@ -34,10 +34,18 @@ A k-means color scheme generator. rm -rf %{pypi_name}.egg-info %build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif %files -n python3-%{pypi_name} %doc PKG-INFO @@ -45,7 +53,11 @@ rm -rf %{pypi_name}.egg-info %{_bindir}/colorz %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}.py +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else %{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif %changelog * Thu May 22 2025 Gilver - 1.0.3-1 diff --git a/anda/langs/python/fast-colorthief/python-fast-colorthief.spec b/anda/langs/python/fast-colorthief/python-fast-colorthief.spec index 599e5af6b3..69529d2df6 100644 --- a/anda/langs/python/fast-colorthief/python-fast-colorthief.spec +++ b/anda/langs/python/fast-colorthief/python-fast-colorthief.spec @@ -1,6 +1,8 @@ %global pypi_name fast-colorthief %global debug_package %{nil} %bcond docs 1 +# Fedora packages pybind11 but not the test module kill me +%bcond test 0 Name: python-%{pypi_name} Version: 0.0.5 @@ -14,9 +16,16 @@ BuildRequires: doxygen BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: pybind11-devel +BuildRequires: pyproject-rpm-macros BuildRequires: python3-devel +# This package is not buildable on EL due to this dep. There's unfortunately not much I can do about this. BuildRequires: python3-sphinxcontrib-rsvgconverter BuildRequires: python3dist(breathe) +%if %{with test} +BuildRequires: python3dist(colorthief) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pybind11-tests) +%endif BuildRequires: python3dist(furo) BuildRequires: python3dist(numpy) BuildRequires: python3dist(pillow) @@ -58,21 +67,32 @@ Documentation files for %{pypi_name} rm -rf %{pypi_name}.egg-info %build -### This is not a fully Python project and is mostly C++ -## Disable PIC -# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_pie -sed -i 's/CMAKE_POSITION_INDEPENDENT_CODE ON/CMAKE_POSITION_INDEPENDENT_CODE OFF/' CMakeLists.txt +## This is not a fully Python project and is mostly C++ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif %if %{with docs} -# generate docs -PYTHONPATH=${PWD} sphinx-build pybind11/docs html -# remove the sphinx-build leftovers +# Generate docs +# Only works in English currently. Sad. +PYTHONPATH=${PWD} sphinx-build pybind11/docs html -D language=en +# Remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif + +%if %{with test} +%check +%pytest +%endif %files -n python3-%{pypi_name} %license pybind11/LICENSE @@ -82,7 +102,11 @@ rm -rf html/.{doctrees,buildinfo} %{python3_sitearch}/fast_colorthief.py %{python3_sitearch}/version.py %{python3_sitearch}/fast_colorthief_backend.cpython-*-%{_arch}-linux-gnu.so -%{python3_sitearch}/fast_colorthief-%{version}.dist-info +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitearch}/fast_colorthief-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitearch}/fast_colorthief-%{version}.dist-info/ +%endif %if %{with docs} %files -n python3-%{pypi_name}-doc diff --git a/anda/langs/python/haishoku/python-haishoku.spec b/anda/langs/python/haishoku/python-haishoku.spec index c64dfab648..d7187805f3 100644 --- a/anda/langs/python/haishoku/python-haishoku.spec +++ b/anda/langs/python/haishoku/python-haishoku.spec @@ -33,17 +33,29 @@ Requires: python3dist(pillow) rm -rf %{pypi_name}.egg-info %build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif %files -n python3-%{pypi_name} # This project does have README files but they are not included in the PyPi source %doc PKG-INFO %license LICENSE %{python3_sitelib}/%{pypi_name}/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else %{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif %changelog * Thu May 22 2025 Gilver E. - 1.1.8-1 diff --git a/anda/langs/python/ignis/python-ignis.spec b/anda/langs/python/ignis/python-ignis.spec index 2148b85600..f2ffff76c1 100644 --- a/anda/langs/python/ignis/python-ignis.spec +++ b/anda/langs/python/ignis/python-ignis.spec @@ -8,6 +8,7 @@ URL: https://linkfrg.github.io/ignis Source: https://github.com/linkfrg/ignis/archive/v%{version}/ignis-%{version}.tar.gz Packager: madonuko +BuildRequires: pyproject-rpm-macros BuildRequires: python3-devel BuildRequires: gcc git-core BuildRequires: pkgconfig(glib-2.0) diff --git a/anda/langs/python/pillow-heif/python3-pillow-heif.spec b/anda/langs/python/pillow-heif/python3-pillow-heif.spec index 07524a6dc2..d98d82d95c 100644 --- a/anda/langs/python/pillow-heif/python3-pillow-heif.spec +++ b/anda/langs/python/pillow-heif/python3-pillow-heif.spec @@ -73,7 +73,11 @@ Documentation for %{srcname}. %build # Native build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif # Doc build %if %{with doc} @@ -84,7 +88,11 @@ rm -f docs/_build_py3/html/.buildinfo %install # Native build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif %check # Check Python 3 modules @@ -98,7 +106,11 @@ popd %doc README.md CHANGELOG.md %license LICENSE.txt %{python3_sitearch}/pillow_heif/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitearch}/pillow_heif-%{version}-py%{python3_version}.egg-info/ +%else %{python3_sitearch}/pillow_heif-%{version}.dist-info/ +%endif %{python3_sitearch}/_pillow_heif.*.so %files -n python%{python3_pkgversion}-%{srcname}-devel diff --git a/anda/langs/python/protobuf/python3-protobuf.spec b/anda/langs/python/protobuf/python3-protobuf.spec index 6a1a5099c9..f2c69283df 100644 --- a/anda/langs/python/protobuf/python3-protobuf.spec +++ b/anda/langs/python/protobuf/python3-protobuf.spec @@ -31,15 +31,27 @@ Protocol Buffers are Google's data interchange format rm -rf %{pypi_name}.egg-info %build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif %files -n python3-%{pypi_name} %doc README.md %{python3_sitearch}/google/ -%{python3_sitearch}/protobuf-%{version}.dist-info/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitearch}/%{pypi_name}-%{version}.dist-info/ +%endif %changelog * Sun Feb 19 2023 windowsboy111 - 4.22.0-1 diff --git a/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec b/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec index 439dbf8fec..4df803be99 100644 --- a/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec +++ b/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec @@ -3,6 +3,13 @@ %global pypi_name sphinxcontrib_moderncmakedomain %global real_name sphinxcontrib-moderncmakedomain +# Tests fail on EL even with Pytest due to the package versions +%if 0%{?rhel} +%bcond test 0 +%else +%bcond test 1 +%endif + Name: python-%{real_name} Version: 3.29.0 Release: 2%{?dist} @@ -45,10 +52,8 @@ Modern CMake domain entries, originally from Kitware. %install %pyproject_install +%if %{with test} %check -%if 0%{?rhel} -%pytest tests/*.py -%else nox -s tests %endif @@ -57,7 +62,7 @@ nox -s tests %doc README.md %license LICENSE %{python3_sitelib}/sphinxcontrib/moderncmakedomain -%{python3_sitelib}/%{pypi_name}-%{version}.dist-info +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ %changelog * Sat May 10 2025 Gilver E. - 3.29.0-1 diff --git a/anda/tools/modern-colorthief/modern-colorthief.spec b/anda/tools/modern-colorthief/modern-colorthief.spec index 6520327e91..109387ad99 100644 --- a/anda/tools/modern-colorthief/modern-colorthief.spec +++ b/anda/tools/modern-colorthief/modern-colorthief.spec @@ -27,12 +27,11 @@ BuildRequires: python3dist(shibuya) BuildRequires: python3dist(sphinx) %endif %if %{with test} -%if 0%{?fedora} <= 42 +%if 0%{?fedora} > 40 BuildRequires: poetry -# Colorthief does not exist on Rawhide? -BuildRequires: python3dist(colorthief) BuildRequires: python3dist(poetry) %endif +BuildRequires: python3dist(colorthief) BuildRequires: python3dist(fast-colorthief) BuildRequires: python3dist(pytest) %endif @@ -80,9 +79,10 @@ done %if %{with test} %check +# Poetry doesn't exist on EL and is too old on 40 +%if 0%{?fedora} <= 40 || 0%{?rhel} %pytest tests/*.py -# Poetry Pytests will fail on Rawhide due to original Colorthief being missing -%if 0%{?fedora} <= 42 +%else # This is in the wrong spot in pyproject.toml and Poetry hates it # May seem like defeating the purpose of testing but the other tests can be useful sed -iE 's/python = ">=3.9,<3.14"//' pyproject.toml @@ -97,7 +97,7 @@ poetry run pytest %license LICENSE %license LICENSE.dependencies %{python3_sitearch}/%{pypi_name} -%{python3_sitearch}/%{pypi_name}-%{version}.dist-info +%{python3_sitearch}/%{pypi_name}-%{version}.dist-info/ %if %{with docs} %files -n python3-%{name}-doc