feat: The Python ifcondening (#5050) (#5088)

* chore(sphinxcontrib-moderncmakedomain): The ifcondening



* chore(colorz): The ifcondening



* chore(protobuf): The ifcondening



* fix: That's siteARCH



* cleanup: /



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



* chore(pillow-heif): The ifcondening



* chore(haishoku): The ifcondening



* chore(fast-colorthief): The ifcondening



* chore(ignis): The ifcondening



* chore(modern-colorthief): The Ifcondening



* chore(shibuya): The ifcondening



* 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

---------


(cherry picked from commit f8eb58ff9c)

Signed-off-by: Gilver <rockgrub@disroot.org>
Co-authored-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
Raboneko
2025-05-27 13:43:55 -07:00
committed by GitHub
parent 254a3f9f36
commit b32d838df4
10 changed files with 122 additions and 19 deletions
@@ -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