From 05d6a6072a8a06074c8ccfba8af720c4364f7fb4 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Wed, 28 May 2025 08:45:18 -0700 Subject: [PATCH] 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 7c51fa5694e8a49d86652985e940b79e3d11956d) Signed-off-by: Gilver Co-authored-by: Gilver --- anda/langs/python/materialyoucolor/anda.hcl | 5 ++ .../python-materialyoucolor.spec | 70 +++++++++++++++++++ .../langs/python/materialyoucolor/update.rhai | 1 + 3 files changed, 76 insertions(+) create mode 100644 anda/langs/python/materialyoucolor/anda.hcl create mode 100644 anda/langs/python/materialyoucolor/python-materialyoucolor.spec create mode 100644 anda/langs/python/materialyoucolor/update.rhai diff --git a/anda/langs/python/materialyoucolor/anda.hcl b/anda/langs/python/materialyoucolor/anda.hcl new file mode 100644 index 0000000000..3e4457e184 --- /dev/null +++ b/anda/langs/python/materialyoucolor/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "python-materialyoucolor.spec" + } +} diff --git a/anda/langs/python/materialyoucolor/python-materialyoucolor.spec b/anda/langs/python/materialyoucolor/python-materialyoucolor.spec new file mode 100644 index 0000000000..cccdaeafe5 --- /dev/null +++ b/anda/langs/python/materialyoucolor/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. + +%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. - 2.0.10-1 +- Initial package. diff --git a/anda/langs/python/materialyoucolor/update.rhai b/anda/langs/python/materialyoucolor/update.rhai new file mode 100644 index 0000000000..b258c2de3d --- /dev/null +++ b/anda/langs/python/materialyoucolor/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("materialyoucolor"));