File python-secretary.spec of Package python-secretary
#
# spec file for package python-secretary
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%{!?license: %global license %doc}
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-secretary
Version: 0.2.19
Release: 0
Summary: The power of Jinja2 templates for ODT
License: MIT
Group: Development/Languages/Python
Url: https://github.com/christopher-ramirez/secretary
Source: https://files.pythonhosted.org/packages/source/s/secretary/secretary-%{version}.tar.gz
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module markdown2}
# Test build requirements:
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Jinja2
Requires: python-markdown2
BuildArch: noarch
%python_subpackages
%description
Take the power of Jinja2 templates to OpenOffice and LibreOffice
and create reports in your web applications.
Secretary allows you to use Open Document Text (ODT) files as templates
for rendering reports or letters. Secretary is an alternative solution
for creating office documents and reports in OpenDocument Text format
from templates that can be visually composed using the
OpenOffice.org/LibreOffice Writer word processor.
Secretary use the semantics of jinja2 templates to render ODT files.
Most features in jinja can be used into your ODT templates including
variable printing, filters and flow control.
Rendered documents are produced in ODT format, and can then be converted
to PDF, MS Word or other supported formats using the UNO Bridge or a
library like PyODConverter
%prep
%setup -q -n secretary-%{version}
# Fix shebang
sed -i 's/^#!.*//g' markdown_map.py secretary.py
%build
%python_build
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
# No test in upstream pypi tgz
#%%check
#%%python_expand PYTHONPATH=%%{buildroot}%%{$python_sitelib} py.test-%%{$python_version}
%files %python_files
%defattr(-,root,root,-)
%{python_sitelib}/*
%changelog