# # spec file for package python-smartypants # # Copyright (c) 2023 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/ # %{?sle15_python_module_pythons} Name: python-smartypants Version: 2.0.1 Release: 8.9 Summary: Python fork of perl SmartyPants License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/leohemsted/smartypants.py Source: https://github.com/leohemsted/smartypants.py/archive/v%{version}.tar.gz#/smartypants-%{version}.tar.gz Patch0: use-sys-executable.patch Patch1: fix-312.patch BuildRequires: %{python_module docutils} BuildRequires: %{python_module pygments} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives Requires(postun):update-alternatives BuildArch: noarch %python_subpackages %description smartypants is a Python implementation of the perl SmartyPants, which translates plain ASCII punctuation characters into smart typographic punctuation HTML entities. %prep %autosetup -p1 -n smartypants.py-%{version} %build %python_build %install %python_install %{python_expand sed -i '1{/^#!/d}' %{buildroot}%{$python_sitelib}/smartypants.py %fdupes %{buildroot}%{$python_sitelib} } %python_clone -a %{buildroot}%{_bindir}/smartypants %post %python_install_alternative smartypants %postun %python_uninstall_alternative smartypants %check %pyunittest discover -v tests %files %{python_files} %license COPYING %doc README.rst docs/*.rst %python_alternative %{_bindir}/smartypants %{python_sitelib}/smartypants.py %{python_sitelib}/smartypants-%{version}*-info %pycache_only %{python_sitelib}/__pycache__/* %changelog * Mon Sep 25 2023 Ondřej Súkup - add fix-312.patch to fix python3.12 build * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Thu Apr 13 2023 Matej Cepl - Make calling of %%{sle15modernpython} optional. * Tue Mar 14 2023 Dirk Müller - add use-sys-executable.patch to run the tests with the flavor python interpreter * Wed Sep 8 2021 pgajdos@suse.com - %%check: use %%pyunittest rpm macro - use python3 instead of python in env * Tue May 7 2019 John Vandenberg - Activate test suite - Update Summary and Description - Add %%doc * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Sun Jul 29 2018 jengelh@inai.de - Update descriptions. * Thu May 24 2018 toddrme2178@gmail.com - Update to 2.0.1 * use re.match instead of re.search to improve performance on large strings - spec file cleanups - Switch to wheel - Add license * Sun May 7 2017 benoit.monin@gmx.fr - convert the package to singlespec - call fdupes to fix duplicated files * Thu Dec 29 2016 benoit.monin@gmx.fr - update to version 2.0.0 + drop Pyblosxom support + drop str-type attr + drop fooBarXyz functions, such as smartyPants, educateQuotes, and processEscapes + add Attr.u and Attr.h for Unicode characters and HTML named entities outputs, respectively. The stupefy_entities has become convert_entities to support all three types of conversions.(#6) + Makefile: do not build bdist_wininst --plat-name win32 per :pep:527#bdist-dmg-bdist-msi-and-bdist-wininst + Makefile: test packages build in test_setup target + Makefile: rename target install_test to test_setup - additional changes from version 1.8.6 + Makefile: add LC_ALL=C test for locale setting on setup.py wrt + change virtualenv invocation method in install_test target + fix UnicodeDecodeError on opening smartypants.py, which includes Unicode characters, when running setup.py with Python3 and specific locales - update project url - update source url to pythonhosted * Thu Jul 17 2014 benoit.monin@gmx.fr - fix usage of update-alternatives * Thu Jul 3 2014 benoit.monin@gmx.fr - update to version 1.8.5 + fix requirement of Wheel, now optional - remove BuildRequires python-wheel, now unneeded * Wed Jul 2 2014 benoit.monin@gmx.fr - use update-alternatives for the smartypants binary * Tue Jul 1 2014 benoit.monin@gmx.fr - update to version 1.8.4 + add missing COPYING and CHANGES.rst to package + add bdist_wheel to the building process for Python Wheel format + add test_doc8 target + fix install_test on missing of Wheel package + fix argparse version option breaks CLI on Python 3 - add build dependencies python-setuptools and python-wheel - drop chmod on README.rst, fixed upstream - remove shebang and excutable bit on smartypants.py, not a script - add COPYING and CHANGE.rst to package documentation * Tue Nov 19 2013 p.drouand@gmail.com - Update to version 1.8.3 + No changelog available - COPYING is not provided anymore by upstream * Mon Jul 23 2012 saschpe@suse.de - Initial version