add: materialyoucolor-python (#5102) (#5104)

* add: materialyoucolor-python

* fix: Apparently this is CPython!?



* fix: Missing builddep



* fix: Pillow



* cleanup: That was bothering me



* fix: Don't test



* O...kay, DNL and check what happened



* HUH



* cleanup: Blegh

* fix: CPython is not noarch

---------


(cherry picked from commit 7c51fa5694)

Signed-off-by: Gilver <rockgrub@disroot.org>
Co-authored-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
Raboneko
2025-05-28 08:45:18 -07:00
committed by GitHub
parent 894f3aaabe
commit 05d6a6072a
3 changed files with 76 additions and 0 deletions
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "python-materialyoucolor.spec"
}
}
@@ -0,0 +1,70 @@
%global pypi_name materialyoucolor
%bcond test 0
Name: python-%{pypi_name}
Version: 2.0.10
Release: 1%{?dist}
Summary: Material You color generation algorithms in pure python!
License: MIT
URL: https://github.com/T-Dynamos/materialyoucolor-python
Source0: %{pypi_source}
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: pyproject-rpm-macros
BuildRequires: python3-devel
BuildRequires: python3dist(pillow)
BuildRequires: python3dist(pip)
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(rich)
BuildRequires: python3dist(setuptools)
Packager: Gilver E. <rockgrub@disroot.org>
%description
Material You color generation algorithms in Python.
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
Material You color generation algorithms in Python.
%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
# Test image isn't included and I'm not supplying one
%if %{with test}
%check
%pytest test_image.jpg 1
%endif
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{python3_sitearch}/%{pypi_name}/
%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
* Wed May 28 2025 Gilver E. <rockgrub@disroot.org> - 2.0.10-1
- Initial package.
@@ -0,0 +1 @@
rpm.version(pypi("materialyoucolor"));