- 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
This commit is contained in:
Matej Cepl 2023-03-28 08:43:01 +00:00 committed by Git OBS Bridge
parent 85aafb6da3
commit eeb193a825
4 changed files with 74 additions and 9 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -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"]

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue Mar 28 08:42:01 UTC 2023 - Matej Cepl <mcepl@suse.com>
- 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 <kastl@b1-systems.de>

View File

@ -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