diff --git a/0001-fix-version-of-markdown-it-py.patch b/0001-fix-version-of-markdown-it-py.patch new file mode 100644 index 0000000..981ad18 --- /dev/null +++ b/0001-fix-version-of-markdown-it-py.patch @@ -0,0 +1,25 @@ +From 63f180fa1b5d6dfcdea0bf9d6cfa9a33f8a21f7d Mon Sep 17 00:00:00 2001 +From: li-miaomiao_zhr +Date: Thu, 17 Aug 2023 19:48:42 +0800 +Subject: [PATCH] fix version of markdown-it-py + +--- + pyproject.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index a25a0a3..4410294 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -14,7 +14,7 @@ license = { file = "LICENSE" } + requires-python = ">=3.7" + dependencies = [ + 'tomli >=1.1.0; python_version < "3.11"', +- 'markdown-it-py >=1.0.0,<3.0.0', ++ 'markdown-it-py >=1.0.0,<=3.0.0', + 'importlib-metadata >=3.6.0; python_version < "3.10"', + 'typing-extensions >=3.7.4; python_version < "3.8"', + ] +-- +2.39.1 + diff --git a/mdformat-0.7.16.tar.gz b/mdformat-0.7.16.tar.gz new file mode 100644 index 0000000..c1b7d02 Binary files /dev/null and b/mdformat-0.7.16.tar.gz differ diff --git a/python-mdformat.spec b/python-mdformat.spec new file mode 100644 index 0000000..0bd3183 --- /dev/null +++ b/python-mdformat.spec @@ -0,0 +1,50 @@ +%global _empty_manifest_terminate_build 0 +%global pypi_name mdformat + +%global _description %{expand: +Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files.\ +Mdformat is a Unix-style command-line tool as well as a Python library.} + +Name: python-%{pypi_name} +Version: 0.7.16 +Release: 1 +Summary: CommonMark compliant Markdown formatter +License: MIT +URL: https://github.com/executablebooks/mdformat +Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-setuptools +BuildRequires: python3-setuptools_scm +Patch: 0001-fix-version-of-markdown-it-py.patch + +%description %_description + +%package -n python3-%{pypi_name} +Summary: CommonMark compliant Markdown formatter +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %_description + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +%pyproject_build + +%install +%pyproject_install + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{python3_sitelib}/mdformat/ +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%{_bindir}/mdformat + +%changelog +* Thu Aug 17 2023 li-miaomiao_zhr - 0.7.16-1 +- Package init