From 262483869e89f83b1ffe2fc8ae8c0dad72fc801f Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Wed, 28 May 2025 07:53:23 -0700 Subject: [PATCH] add: Pywal16 (#5097) (#5100) * add: PyWal16 * Some serious cleanup I HATE 2rpm * The stupid * add: Pywal16 * fix: WHAT * fix: Seriously what is going on there * Facepalm emoji --------- (cherry picked from commit b26b5d07a284ffaf8151372a7d7050e4f059e1c0) Signed-off-by: Gilver Co-authored-by: Gilver --- anda/langs/python/pywal16/anda.hcl | 6 ++ anda/langs/python/pywal16/python-pywal16.spec | 83 +++++++++++++++++++ anda/langs/python/pywal16/update.rhai | 1 + 3 files changed, 90 insertions(+) create mode 100644 anda/langs/python/pywal16/anda.hcl create mode 100644 anda/langs/python/pywal16/python-pywal16.spec create mode 100644 anda/langs/python/pywal16/update.rhai diff --git a/anda/langs/python/pywal16/anda.hcl b/anda/langs/python/pywal16/anda.hcl new file mode 100644 index 0000000000..f98544e892 --- /dev/null +++ b/anda/langs/python/pywal16/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "python-pywal16.spec" + } +} diff --git a/anda/langs/python/pywal16/python-pywal16.spec b/anda/langs/python/pywal16/python-pywal16.spec new file mode 100644 index 0000000000..11a9c384f7 --- /dev/null +++ b/anda/langs/python/pywal16/python-pywal16.spec @@ -0,0 +1,83 @@ +%global pypi_name pywal16 +%global _description %{expand: +Pywal is a tool that generates a color palette from the dominant colors in an image. It then applies the colors system-wide and on-the-fly in all of your favourite programs.} + +Name: python-%{pypi_name} +Version: 3.8.6 +Release: 1%{?dist} +Summary: 16 color fork of the original Pywal +License: MIT +URL: https://github.com/eylles/pywal16 +Source0: %{pypi_source} +BuildRequires: ImageMagick +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(colorama) +BuildRequires: python3dist(colorthief) +BuildRequires: python3dist(colorz) +BuildRequires: python3dist(fast-colorthief) +BuildRequires: python3dist(haishoku) +BuildRequires: python3dist(modern-colorthief) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(setuptools) +Obsoletes: python3-pywal < 3.5.0-1 +BuildArch: noarch +Packager: Gilver E. + +%description +This project is a 16 colors fork of Pywal. + +%package -n python3-%{pypi_name} +Summary: %{summary} +Requires: ImageMagick +Requires: python3dist(colorz) +Requires: python3dist(haishoku) +Requires: (python3dist(modern-colorthief) or python3dist(fast-colorthief) or python3dist(colorthief)) +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %_description + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +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 + +install -Dm644 data/man/man1/wal.1 -t %{buildroot}%{_mandir}/man1 + +# For some reason this is where the project tries to install the manpage? +rm -rf %{buildroot}%{_prefix}/man + +%check +%pytest + +%files -n python3-%{pypi_name} +%doc PKG-INFO +%doc README.md +%license LICENSE.md +%{_bindir}/wal +%{_mandir}/man1/wal.1.* +%{python3_sitelib}/pywal/ +%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 +* Wed May 28 2025 Gilver E. - 3.8.6-1 +- Initial package. diff --git a/anda/langs/python/pywal16/update.rhai b/anda/langs/python/pywal16/update.rhai new file mode 100644 index 0000000000..6c50d87f70 --- /dev/null +++ b/anda/langs/python/pywal16/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("pywal16"));