2018-05-24 20:56:53 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-smartypants
|
|
|
|
#
|
2019-05-08 10:06:58 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2018-05-24 20:56:53 +00: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 14:04:14 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-24 20:56:53 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-smartypants
|
|
|
|
Version: 2.0.1
|
|
|
|
Release: 0
|
2019-05-08 10:06:58 +00:00
|
|
|
Summary: Python fork of perl SmartyPants
|
2018-05-24 20:56:53 +00:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
Url: https://github.com/leohemsted/smartypants.py
|
2019-05-08 10:06:58 +00:00
|
|
|
Source: https://github.com/leohemsted/smartypants.py/archive/v%{version}.tar.gz#/smartypants-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module docutils}
|
|
|
|
BuildRequires: %{python_module pygments}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-05-24 20:56:53 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-05-08 10:06:58 +00: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 20:56:53 +00:00
|
|
|
|
|
|
|
%prep
|
2019-05-08 10:06:58 +00:00
|
|
|
%setup -q -n smartypants.py-%{version}
|
2018-05-24 20:56:53 +00:00
|
|
|
|
|
|
|
%build
|
2019-05-08 10:06:58 +00:00
|
|
|
%python_build
|
2018-05-24 20:56:53 +00:00
|
|
|
|
|
|
|
%install
|
2019-05-08 10:06:58 +00:00
|
|
|
%python_install
|
|
|
|
%{python_expand sed -i '1{/^#!/d}' %{buildroot}%{$python_sitelib}/smartypants.py
|
2018-05-24 20:56:53 +00:00
|
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
}
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/smartypants
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative smartypants
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative smartypants
|
|
|
|
|
|
|
|
%check
|
2019-05-08 10:06:58 +00:00
|
|
|
%python_exec setup.py test
|
2018-05-24 20:56:53 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%license COPYING
|
2019-05-08 10:06:58 +00:00
|
|
|
%doc README.rst docs/*.rst
|
2018-05-24 20:56:53 +00:00
|
|
|
%python_alternative %{_bindir}/smartypants
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|