From eeb193a825894a056814172d54a34360a450c2422d174ee44350d408f450de72 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 28 Mar 2023 08:43:01 +0000 Subject: [PATCH] - Add no-hatchling-requirements_txt.patch, which manually create project.dependencies in pyproject.toml instead of using hatch_requirements_txt module. This is a brutal hack, but otherwise (see sr#1072844 for details) we need python-hatch_requirements_txt which pulls in excessive number of packages (starting with python-conincidence, python-whey, python-domdf-python-tools, and many others). Until we have these in openSUSE, we should stay with this hand-managed patch. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mkdocs-material?expand=0&rev=2 --- _multibuild | 3 +++ no-hatchling-requirements_txt.patch | 41 +++++++++++++++++++++++++++++ python-mkdocs-material.changes | 12 +++++++++ python-mkdocs-material.spec | 27 ++++++++++++------- 4 files changed, 74 insertions(+), 9 deletions(-) create mode 100644 _multibuild create mode 100644 no-hatchling-requirements_txt.patch diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/no-hatchling-requirements_txt.patch b/no-hatchling-requirements_txt.patch new file mode 100644 index 0000000..d982722 --- /dev/null +++ b/no-hatchling-requirements_txt.patch @@ -0,0 +1,41 @@ +--- + pyproject.toml | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -30,12 +30,23 @@ build-backend = "hatchling.build" + name = "mkdocs-material" + dynamic = [ + "version", +- "dependencies", + "license", + "description", + "authors", + "keywords" + ] ++dependencies = [ ++ "jinja2>=3.0", ++ "markdown>=3.2", ++ "mkdocs>=1.4.2", ++ "mkdocs-material-extensions>=1.1", ++ "pygments>=2.14", ++ "pymdown-extensions>=9.9.1", ++ "colorama>=0.4", ++ "regex>=2022.4.24", ++ "requests>=2.26" ++] ++ + readme = "README.md" + requires-python = ">=3.7" + classifiers = [ +@@ -72,9 +83,6 @@ source = "nodejs" + [tool.hatch.metadata.hooks.nodejs] + fields = ["license", "description", "authors", "keywords", "urls"] + +-[tool.hatch.metadata.hooks.requirements_txt] +-filename = "requirements.txt" +- + [tool.hatch.build.targets.wheel] + include = ["/material"] + diff --git a/python-mkdocs-material.changes b/python-mkdocs-material.changes index da774d8..d4fb8a4 100644 --- a/python-mkdocs-material.changes +++ b/python-mkdocs-material.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Mar 28 08:42:01 UTC 2023 - Matej Cepl + +- Add no-hatchling-requirements_txt.patch, which manually + create project.dependencies in pyproject.toml instead of + using hatch_requirements_txt module. This is a brutal + hack, but otherwise (see sr#1072844 for details) we need + python-hatch_requirements_txt which pulls in excessive number + of packages (starting with python-conincidence, python-whey, + python-domdf-python-tools, and many others). Until we have + these in openSUSE, we should stay with this hand-managed patch. + ------------------------------------------------------------------- Sat Mar 18 10:42:22 UTC 2023 - Johannes Kastl diff --git a/python-mkdocs-material.spec b/python-mkdocs-material.spec index de38eee..f884f17 100644 --- a/python-mkdocs-material.spec +++ b/python-mkdocs-material.spec @@ -23,21 +23,30 @@ Summary: Material theme for mkdocs License: MIT URL: https://squidfunk.github.io/mkdocs-material/ Source: https://files.pythonhosted.org/packages/source/m/mkdocs_material/mkdocs_material-%{version}.tar.gz -BuildRequires: python-rpm-macros -BuildRequires: %{python_module hatchling} -BuildRequires: %{python_module hatch_nodejs_version} -BuildRequires: %{python_module hatch_requirements_txt} -BuildRequires: %{python_module pip} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module jinja2 >= 3.0} +# PATCH-FIX-OPENSUSE no-hatchling-requirements_txt.patch mcepl@suse.com +# Manually create project.dependencies in pyproject.toml instead of using +# hatch_requirements_txt module +# This is a brutal hack, but otherwise (see sr#1072844 for +# details) we need python-hatch_requirements_txt which pulls in +# excessive number of packages (starting with python-conincidence, +# python-whey, python-domdf-python-tools, and many others). Until +# we have these in openSUSE, we should stay with this +# hand-managed patch. +Patch0: no-hatchling-requirements_txt.patch BuildRequires: %{python_module Markdown >= 3.2} +BuildRequires: %{python_module hatch_nodejs_version} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module jinja2 >= 3.0} BuildRequires: %{python_module mkdocs >= 1.4.2} BuildRequires: %{python_module mkdocs-material-extensions >= 1.1} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pygments >= 2.12} BuildRequires: %{python_module pymdown-extensions >= 9.4} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes -Requires: python-jinja2 >= 3.0 +BuildRequires: python-rpm-macros Requires: python-Markdown >= 3.2 +Requires: python-jinja2 >= 3.0 Requires: python-mkdocs >= 1.4.2 Requires: python-mkdocs-material-extensions >= 1.1 Requires: python-pygments >= 2.14 @@ -49,7 +58,7 @@ BuildArch: noarch Material theme for mkdocs %prep -%setup -q -n mkdocs_material-%{version} +%autosetup -p1 -n mkdocs_material-%{version} %build %pyproject_wheel