From af239c202d333e823c095c7fae731852e7da3256659afb68c0ef98eac1c3cf3b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 5 May 2025 15:02:11 +0000 Subject: [PATCH] - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CommonMark?expand=0&rev=33 --- python-CommonMark.changes | 171 ++++++++++++++++++++++++++++++++++++++ python-CommonMark.spec | 87 +++++++++++++++++++ .gitattributes | 23 +++++ .gitignore | 1 + commonmark-0.9.1.tar.gz | 3 + 5 files changed, 285 insertions(+) create mode 100644 python-CommonMark.changes create mode 100644 python-CommonMark.spec create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 commonmark-0.9.1.tar.gz diff --git a/python-CommonMark.changes b/python-CommonMark.changes new file mode 100644 index 0000000..8452305 --- /dev/null +++ b/python-CommonMark.changes @@ -0,0 +1,171 @@ +------------------------------------------------------------------- +Mon May 5 13:01:13 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Fri Apr 21 12:20:21 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:40:34 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Fri Mar 24 12:52:42 UTC 2023 - Daniel Garcia + +- Remove not needed requirement python-setuptools + +------------------------------------------------------------------- +Mon Nov 8 08:56:01 UTC 2021 - Hui-Zhi Zhao + +- Remove test on python2 since it only works with python3 + +------------------------------------------------------------------- +Thu Sep 2 11:27:12 UTC 2021 - pgajdos@suse.com + +- %check: use %pyunittest rpm macro, do not use setup.py test + +------------------------------------------------------------------- +Wed Apr 14 06:00:21 UTC 2021 - Steve Kowalik + +- Drop broken %ifpython3 macro + +------------------------------------------------------------------- +Wed May 6 09:55:17 UTC 2020 - Matej Cepl + +- Don't use %python3_only command, but properly use alternatives. + +------------------------------------------------------------------- +Mon Mar 16 10:26:20 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + +------------------------------------------------------------------- +Mon Oct 7 13:31:14 UTC 2019 - Tomáš Chvátal + +- Update to 0.9.1: + * Require newer future package + * minor fixes + +------------------------------------------------------------------- +Thu May 23 08:13:19 UTC 2019 - pgajdos@suse.com + +- version update to 0.9.0 + * The CommonMark spec has been updated to 0.29. + +------------------------------------------------------------------- +Tue Mar 5 14:36:25 UTC 2019 - Tomáš Chvátal + +- Update to 0.8.1: + * Added the Node.normalize() method. (from @lez) + * Renamed package name to commonmark for PEP8 compliance. You can now do import commonmark as well as import CommonMark. Closes #60 + * Added testing on Python 3.7. + * Removed CommonMark symlink. So, as of this version, you need to replace all instances of CommonMark with commonmark in your code. +- Remove the not-needed subpackages +- Run the tests + +------------------------------------------------------------------- +Tue Dec 4 12:46:47 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Sat Apr 7 21:30:12 UTC 2018 - arun@gmx.de + +- specfile: + * update copyright year + +- update to version 0.7.5: + * Fixed smart dashes bug in Python 3 (from @alvra) + +------------------------------------------------------------------- +Mon Oct 30 01:51:43 UTC 2017 - arun@gmx.de + +- update to version 0.7.4: + * The CommonMark spec has been updated to 0.28. + +------------------------------------------------------------------- +Wed Jun 21 22:11:08 UTC 2017 - dimstar@opensuse.org + +- Fix typo in Requires (pyython3 -> python3). + +------------------------------------------------------------------- +Fri Jun 9 13:22:57 UTC 2017 - jengelh@inai.de + +- A roadmap does not belong into the description. +- Resolve typographicly wrong apostrophe. + +------------------------------------------------------------------- +Sat May 6 03:31:54 UTC 2017 - toddrme2178@gmail.com + +- Fix Provides/Obsoletes. + +------------------------------------------------------------------- +Fri Apr 21 14:11:41 UTC 2017 - toddrme2178@gmail.com + +- Split "cmark" executable into own package to avoid conflicts with + the cmark C reference implementation. + +------------------------------------------------------------------- +Mon Apr 3 14:56:45 UTC 2017 - toddrme2178@gmail.com + +- Update to 0.7.3 + * The CommonMark spec has been updated to 0.27. +- Update to 0.7.2 + * Removed outdated files from distributed packages, reported by @hyperknot +- Update to 0.7.1 + * Updated CommonMark spec to 0.26. + * Fixed JSON output invoked by `cmark -aj somefile.md`, reported by @rplCloud + * Fixed a bug with `dumpAST()` on ordered lists, from @rflynn +- Update to 0.7.0 + * The `cmark.py` script is now just called `cmark`. + * Fixed a bug where the `cmark.py` script contained a bogus path, reported + by @yuhui-lin. + * Fixed a bug where a TypeError could occur, reported by @civalin. +- Update to 0.6.4 + * The CommonMark spec has been updated to 0.25. + * The HtmlRenderer has been refactored based on upstream changes in commonmark.js. + * Python 2 fixes from @eric-wieser + * Contributions from @funkybob and @hyperknot +- Update to 0.6.3 + * CommonMark-py now supports Python 2.6. + * The CommonMark spec has been updated to 0.24. +- Update to 0.6.2 + * Fixed a UnicodeEncodeError when parsing unicode entities on + Python 2. As a result, CommonMark-py now relies on the "future" + module in Python 2, as documented in setup.py. This can be found on + pypi: https://pypi.python.org/pypi/future +- Update to 0.6.1 + * Fixed an IndexError exception that occurred when input string + was empty. +- Update to 0.6.0 + * CommonMark-py now complies to the 0.23 CommonMark spec + http://spec.commonmark.org/0.23/ + * The ExtensionBlock has been removed in this release, since + the parser has been rewritten. + * Added a compatibility fix for Python 2.6, but this version + of Python still isn't really supported. + * `HTMLRenderer` has been renamed to `HtmlRenderer`. + * `DocParser` has been renamed to `Parser`. +- Update to 0.5.5 + * Random bug fixes + * Internal code structure changes + * Compatibility fixes for Python 3 +- Initial singlespec version + +------------------------------------------------------------------- +Sun May 8 07:15:15 UTC 2016 - arun@gmx.de + +- specfile: + * changed to https for source url + * updated source url to files.pythonhosted.org + + +------------------------------------------------------------------- +Wed Dec 9 18:26:59 UTC 2015 - bruno@ioda-net.ch + +- Initial packaging on obs + diff --git a/python-CommonMark.spec b/python-CommonMark.spec new file mode 100644 index 0000000..d5edf32 --- /dev/null +++ b/python-CommonMark.spec @@ -0,0 +1,87 @@ +# +# spec file for package python-CommonMark +# +# Copyright (c) 2025 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/ +# + + +%define oldpython python +%bcond_without python2 +%{?sle15_python_module_pythons} +Name: python-CommonMark +Version: 0.9.1 +Release: 0 +Summary: Python parser for the CommonMark Markdown spec +License: BSD-3-Clause +URL: https://github.com/rtfd/CommonMark-py +Source: https://files.pythonhosted.org/packages/source/c/commonmark/commonmark-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives +Provides: python-commonmark = %{version} +Obsoletes: python-commonmark < %{version} +BuildArch: noarch +%if %{with python2} +BuildRequires: python-future >= 0.14.0 +%endif +%ifpython2 +Requires: python-future >= 0.14.0 +Obsoletes: %{oldpython}-commonmark < %{version} +Provides: %{oldpython}-commonmark = %{version} +%endif +Conflicts: cmark +Provides: cmark-python +Obsoletes: cmark-python +%python_subpackages + +%description +Pure Python port of jgm's stmd.js, a Markdown parser and renderer for the +CommonMark specification, using only native modules. + +%prep +%setup -q -n commonmark-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/cmark +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export LANG=en_US.UTF-8 +%if "%{python_flavor}" == "python3" +%pyunittest commonmark/tests/*.py +# On python2 we error out on unicode issues +PYTHONPATH=%{buildroot}%{python3_sitelib} python3 commonmark/tests/run_spec_tests.py +%endif + +%post +%python_install_alternative cmark + +%postun +%python_uninstall_alternative cmark + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/commonmark +%{python_sitelib}/commonmark-%{version}*info +%python_alternative %{_bindir}/cmark + +%changelog 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/commonmark-0.9.1.tar.gz b/commonmark-0.9.1.tar.gz new file mode 100644 index 0000000..4f8060a --- /dev/null +++ b/commonmark-0.9.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60 +size 95764