feat: The Python ifcondening (#5050)

* chore(sphinxcontrib-moderncmakedomain): The ifcondening

Signed-off-by: Gilver <rockgrub@disroot.org>

* chore(colorz): The ifcondening

Signed-off-by: Gilver <rockgrub@disroot.org>

* chore(protobuf): The ifcondening

Signed-off-by: Gilver <rockgrub@disroot.org>

* fix: That's siteARCH

Signed-off-by: Gilver <rockgrub@disroot.org>

* cleanup: /

Signed-off-by: Gilver <rockgrub@disroot.org>

* chore(lomiri-ui-toolkit): The ifcondening

Signed-off-by: Gilver <rockgrub@disroot.org>

* chore(pillow-heif): The ifcondening

Signed-off-by: Gilver <rockgrub@disroot.org>

* chore(haishoku): The ifcondening

Signed-off-by: Gilver <rockgrub@disroot.org>

* chore(fast-colorthief): The ifcondening

Signed-off-by: Gilver <rockgrub@disroot.org>

* chore(ignis): The ifcondening

Signed-off-by: Gilver <rockgrub@disroot.org>

* chore(modern-colorthief): The Ifcondening

Signed-off-by: Gilver <rockgrub@disroot.org>

* chore(shibuya): The ifcondening

Signed-off-by: Gilver <rockgrub@disroot.org>

* Revert "chore(modern-colorthief): The Ifcondening"

This reverts commit dc82282bb7.

* refactor: Change the ifcondening approach

* cleanup: / again

* Revert "chore(sphinxcontrib-moderncmakedomain): The ifcondening"

This reverts commit 45f5cd8e36.

* Revert "chore(ignis): The ifcondening"

This reverts commit 88c4d68297.

* bulk: She if on my condition

* Updates with new packages

* I forgot the stupit 0 thing

* Fixes based on builds per branch

---------

Signed-off-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
Gilver
2025-05-27 15:23:44 -05:00
committed by GitHub
parent 0abeb4b379
commit f8eb58ff9c
10 changed files with 122 additions and 19 deletions
@@ -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
+13
View File
@@ -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. <rockgrub@disroot.org>
@@ -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
@@ -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 <rockgrub@disroot.org> - 1.0.3-1
@@ -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
@@ -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. <rockgrub@disroot.org> - 1.1.8-1
@@ -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 <mado@fyralabs.com>
BuildRequires: pyproject-rpm-macros
BuildRequires: python3-devel
BuildRequires: gcc git-core
BuildRequires: pkgconfig(glib-2.0)
@@ -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
@@ -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 <wboy111@outlook.com> - 4.22.0-1
@@ -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. <rockgrub@disroot.org> - 3.29.0-1
@@ -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