File azote-palettes.spec of Package azote-palettes

%define skip_python312 1
%define skip_python311 1
%define skip_python310 1
#
# spec file for package azote
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name:           azote-palettes
Version:        1.0.2
Release:        0
Summary:        Creates colours out of image
License:        GPL-3.0-only
Group:          Productivity/Graphics/Viewers
URL:            https://github.com/nwg-piotr/azote-palettes
Source:         v%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  gtk-layer-shell-devel
BuildRequires:  pkgconfig
BuildRequires:  python3-build
BuildRequires:  python3-installer
BuildRequires:  python3-setuptools
BuildRequires:  python3-wheel
BuildRequires:  python3-pip
BuildRequires:  gobject-introspection
Requires:  python3-colortheif
BuildRequires:  python3-gobject
Requires:       python3
Requires:       python-gobject
Requires:       libgtk-3-0
Requires:       libgtk-layer-shell0
Requires:       python3-gobject
Requires:       typelib(GtkLayerShell)
Requires:       ImageMagick
Requires:       python-colortheif
Requires:       python3-gobject
Requires:       python3-gobject-Gdk

BuildArch:      noarch

%description
Creates a palette of up to 36 colours out of a jpg or png image
%prep
%setup -q
%build
%pyproject_wheel

%install
%pyproject_install
install -Dpm 644 dist/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dpm 644 dist/%{name}.svg %{buildroot}%{_datadir}/pixmaps/%{name}.svg
cd %{buildroot}/%{_bindir}

%files
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.svg
%{python_sitelib}/azote_palettes/*
%{python_sitelib}/azote_palettes-%{version}.dist-info/*
%dir %{python_sitelib}/azote_palettes
%dir %{python_sitelib}/azote_palettes-%{version}.dist-info
%{_bindir}/azote-palettes


%changelog
openSUSE Build Service is sponsored by