2019-02-13 10:03:48 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-template-remover
|
|
|
|
#
|
2020-05-19 08:54:28 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2019-02-13 10:03:48 +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.
|
|
|
|
|
2020-05-19 08:54:28 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2019-02-13 10:03:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-template-remover
|
|
|
|
Version: 0.1.9
|
|
|
|
Release: 0
|
|
|
|
Summary: Remove the template markup from html files
|
2020-05-19 08:54:28 +00:00
|
|
|
License: Apache-2.0
|
2019-02-13 10:03:48 +00:00
|
|
|
Group: Development/Languages/Python
|
2020-05-19 08:54:28 +00:00
|
|
|
URL: https://github.com/deezer/template-remover
|
2019-02-13 10:03:48 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/t/template-remover/template-remover-%{version}.tar.gz
|
|
|
|
Source1: https://raw.githubusercontent.com/deezer/template-remover/master/LICENSE
|
2020-05-19 08:54:28 +00:00
|
|
|
BuildRequires: %{python_module docopt >= 0.6.1}
|
2020-06-03 11:00:46 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-02-13 10:03:48 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-docopt >= 0.6.1
|
2020-05-19 08:54:28 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2019-02-13 10:03:48 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Template remover is a tool to remove the PHP and Jinja markup from HTML files.
|
|
|
|
|
|
|
|
Many tools, like html tidy, are designed to parse and analyze html files,
|
|
|
|
however they do not play well when there is language markup. This projects aims
|
|
|
|
to be a simple way of getting rid of those markups.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n template-remover-%{version}
|
2020-05-19 08:54:28 +00:00
|
|
|
cp %{SOURCE1} .
|
2019-02-13 10:03:48 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
mv %{buildroot}%{_bindir}/remove_template.py %{buildroot}%{_bindir}/remove_template
|
2020-05-19 08:54:28 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/remove_template
|
2019-02-13 10:03:48 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2020-06-03 11:00:46 +00:00
|
|
|
%pytest
|
2019-02-13 10:03:48 +00:00
|
|
|
|
2020-05-19 08:54:28 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative remove_template
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative remove_template
|
|
|
|
|
2019-02-13 10:03:48 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst
|
2020-05-19 08:54:28 +00:00
|
|
|
%python_alternative %{_bindir}/remove_template
|
2019-02-13 10:03:48 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|