Blob Blame History Raw
# Python package name
%global srcname markdownextradata

%global forgeurl https://github.com/rosscdh/%{name}/
%global tag %{version}

# Since the Python package is used only as a plugin for mkdocs, and not as a
# general-purpose Python library, the base package is named accordingly (i.e.,
# not python-markdownextradata or similar).
Name:           mkdocs-%{srcname}-plugin
Version:        0.2.4
%forgemeta
Release:        %autorelease
Summary:        MkDocs plugin that injects mkdocs.yml extra variables

License:        MIT
URL:            %{forgeurl}
Source0:        %{forgesource}
BuildArch:      noarch

BuildRequires:  python3-devel

# From tests_require in setup.py (but not in install_requires):
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(click)

%py_provides python3-%{name}

%description
A MkDocs plugin that injects the mkdocs.yml extra variables into the markdown
template

Use case:

  As a user with variables that need to be inserted at the markdown level, not
  the template level.

  I need a mkdocs plugin that will inject my “extras” variables into the
  markdown template before it gets rendered to html.

  So that I can build my markdown pages with different values for images, urls,
  client_names, etc.


%prep
%forgeautosetup


%generate_buildrequires
%pyproject_buildrequires -r


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{srcname}


%check
%pytest


%files -f %{pyproject_files}
%license LICENSE.md
%doc CONTRIBUTING.md
%doc README.md


%changelog
%autochangelog