File python-gi-docgen.spec of Package python-gi-docgen

#
# spec file for package python-gi-docgen
#
# 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/
#


%define pythons python3
Name:           python-gi-docgen
Version:        2025.3
Release:        0
Summary:        A documentation generator for GObject-based libraries
# For reference, as some scripts are known to reorder things:
#               (Apache-2.0 OR GPL-3.0-or-later) AND CC0-1.0 AND MIT AND OFL-1.1
License:        (Apache-2.0 OR GPL-3.0-or-later) AND CC0-1.0 AND MIT AND OFL-1.1
URL:            https://gitlab.gnome.org/GNOME/gi-docgen
Source:         https://files.pythonhosted.org/packages/source/g/gi-docgen/gi_docgen-%{version}.tar.gz
Source98:       README.license
Source99:       %{name}-rpmlintrc

BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
## Build system dependencies
BuildRequires:  python3-setuptools
BuildRequires:  python3-wheel
##
BuildRequires:  python3-Jinja2
BuildRequires:  python3-Markdown
BuildRequires:  python3-MarkupSafe
BuildRequires:  python3-Pygments
BuildRequires:  python3-packaging
BuildRequires:  python3-typogrify

Requires:       python3-Jinja2
Requires:       python3-Markdown > 3.2.0
Requires:       python3-MarkupSafe
Requires:       python3-Pygments
Requires:       python3-packaging
Requires:       python3-typogrify
Requires:       (python3-tomli if ((python310-base with python3-base) or (python39-base with python3-base)))
Requires:       (python3-tomli if python3-base < 3.7)

Obsoletes:      python38-gi-docgen < %{version}
BuildArch:      noarch
%python_subpackages

%description
GI-DocGen is a document generator for GObject-based libraries.
GObject is the base type system of the GNOME project. GI-Docgen
reuses the introspection data generated by GObject-based libraries
to generate the API reference of these libraries, as well as other
ancillary documentation.

%prep
%autosetup -n gi_docgen-%{version} -p1
# Copy README.license to the source tree, so we can use the %%doc macro on it.
cp %{SOURCE98} .

%build
%python3_build

%install
%python3_install
%fdupes %{buildroot}%{python3_sitelib}

%files %{python_files}
%doc README.md README.license
%license LICENSES/Apache-2.0.txt
%license LICENSES/GPL-3.0-or-later.txt
%license LICENSES/MIT.txt
%license LICENSES/OFL-1.1.txt
%license LICENSES/CC0-1.0.txt
%{_bindir}/gi-docgen
%{python3_sitelib}/gidocgen/
%{python3_sitelib}/gi_docgen-%{version}-py%{python3_version}.egg-info/
%{_mandir}/man1/gi-docgen.1%{?ext_man}
%{_datadir}/pkgconfig/gi-docgen.pc

%changelog
openSUSE Build Service is sponsored by