From 61de6179937c21f1a39df4094af97c197daf71fa5023b98e3f5173142b08e979 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 28 Apr 2022 08:01:18 +0000 Subject: [PATCH] Accepting request 972837 from home:sebix please forward to factory OBS-URL: https://build.opensuse.org/request/show/972837 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-markdown-it-py?expand=0&rev=1 --- .gitattributes | 23 +++++++++ .gitignore | 1 + python-markdown-it-py-2.1.0.tar.gz | 3 ++ python-markdown-it-py.changes | 4 ++ python-markdown-it-py.spec | 83 ++++++++++++++++++++++++++++++ 5 files changed, 114 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-markdown-it-py-2.1.0.tar.gz create mode 100644 python-markdown-it-py.changes create mode 100644 python-markdown-it-py.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-markdown-it-py-2.1.0.tar.gz b/python-markdown-it-py-2.1.0.tar.gz new file mode 100644 index 0000000..91fac39 --- /dev/null +++ b/python-markdown-it-py-2.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4c693b45d40759d1b3dd715c78a2e31ad95f42fb26657a115244509b12d9e66 +size 265858 diff --git a/python-markdown-it-py.changes b/python-markdown-it-py.changes new file mode 100644 index 0000000..3b1167d --- /dev/null +++ b/python-markdown-it-py.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Tue Apr 26 10:56:43 UTC 2022 - Sebastian Wagner + +- initial package for version 2.1.0. diff --git a/python-markdown-it-py.spec b/python-markdown-it-py.spec new file mode 100644 index 0000000..54a1faf --- /dev/null +++ b/python-markdown-it-py.spec @@ -0,0 +1,83 @@ +# +# spec file for package python-markdown-it-py +# +# Copyright (c) 2022 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-markdown-it-py +Version: 2.1.0 +Release: 0 +Summary: Python port of markdown-it Markdown parsing +License: MIT +URL: https://github.com/executablebooks/markdown-it-py/ +Source: https://github.com/executablebooks/markdown-it-py/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +#Source: https://files.pythonhosted.org/packages/source/m/markdown-it-py/markdown-it-py-%%{version}.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module flit} +# SECTION tests +BuildRequires: %{python_module mdurl} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pytest-regressions} +BuildRequires: %{python_module fixtures} +# /SECTION +BuildRequires: fdupes +Requires: python-mdurl +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%python_subpackages +#BuildRequires: python3-Sphinx + +%description +This is a Python port of [markdown-it], and some of its associated plugins. + +It follows the CommonMark spec for baseline parsing, has a configurable syntax and is pluggable. + +%prep +%setup -q -n markdown-it-py-%{version} +sed -i '1{/\/usr\/bin\/env python*/d;}' markdown_it/cli/parse.py + +%build +%pyproject_wheel +# building docs requires myst_parser, which depends on this package. Can be activated later +#pushd docs +#PYTHONPATH=.. make html +#rm _build/html/.buildinfo +#popd + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/markdown-it +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# linkify is an optional dependency, not in openSUSE available +%pytest tests -k 'not test_linkify' + +%post +%python_install_alternative markdown-it + +%postun +%python_uninstall_alternative markdown-it + +%files %{python_files} +%{python_sitelib}/markdown_it/ +%{python_sitelib}/markdown_it_py-%{version}*-info +%python_alternative %{_bindir}/markdown-it + +%changelog