2018-05-24 22:56:53 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-smartypants
|
|
|
|
#
|
2023-09-26 00:51:33 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2018-05-24 22:56:53 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 15:04:14 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-24 22:56:53 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-04-21 15:34:20 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2018-05-24 22:56:53 +02:00
|
|
|
Name: python-smartypants
|
|
|
|
Version: 2.0.1
|
|
|
|
Release: 0
|
2019-05-08 12:06:58 +02:00
|
|
|
Summary: Python fork of perl SmartyPants
|
2018-05-24 22:56:53 +02:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Languages/Python
|
2021-09-09 13:45:51 +02:00
|
|
|
URL: https://github.com/leohemsted/smartypants.py
|
2019-05-08 12:06:58 +02:00
|
|
|
Source: https://github.com/leohemsted/smartypants.py/archive/v%{version}.tar.gz#/smartypants-%{version}.tar.gz
|
2023-09-26 00:51:33 +02:00
|
|
|
Patch0: use-sys-executable.patch
|
|
|
|
Patch1: fix-312.patch
|
2019-05-08 12:06:58 +02:00
|
|
|
BuildRequires: %{python_module docutils}
|
|
|
|
BuildRequires: %{python_module pygments}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-05-24 22:56:53 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires(post): update-alternatives
|
2021-09-09 13:45:51 +02:00
|
|
|
Requires(postun):update-alternatives
|
2018-05-24 22:56:53 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-05-08 12:06:58 +02:00
|
|
|
smartypants is a Python implementation of the perl SmartyPants,
|
|
|
|
which translates plain ASCII punctuation characters into smart
|
|
|
|
typographic punctuation HTML entities.
|
2018-05-24 22:56:53 +02:00
|
|
|
|
|
|
|
%prep
|
2023-09-26 00:51:33 +02:00
|
|
|
%autosetup -p1 -n smartypants.py-%{version}
|
2018-05-24 22:56:53 +02:00
|
|
|
|
|
|
|
%build
|
2019-05-08 12:06:58 +02:00
|
|
|
%python_build
|
2018-05-24 22:56:53 +02:00
|
|
|
|
|
|
|
%install
|
2019-05-08 12:06:58 +02:00
|
|
|
%python_install
|
|
|
|
%{python_expand sed -i '1{/^#!/d}' %{buildroot}%{$python_sitelib}/smartypants.py
|
2018-05-24 22:56:53 +02:00
|
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
}
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/smartypants
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative smartypants
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative smartypants
|
|
|
|
|
|
|
|
%check
|
2021-09-09 13:45:51 +02:00
|
|
|
%pyunittest discover -v tests
|
2018-05-24 22:56:53 +02:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%license COPYING
|
2019-05-08 12:06:58 +02:00
|
|
|
%doc README.rst docs/*.rst
|
2018-05-24 22:56:53 +02:00
|
|
|
%python_alternative %{_bindir}/smartypants
|
2023-09-26 00:51:33 +02:00
|
|
|
%{python_sitelib}/smartypants.py
|
|
|
|
%{python_sitelib}/smartypants-%{version}*-info
|
|
|
|
%pycache_only %{python_sitelib}/__pycache__/*
|
2018-05-24 22:56:53 +02:00
|
|
|
|
|
|
|
%changelog
|