2018-09-20 10:53:50 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pelican
|
|
|
|
#
|
2021-01-05 09:21:46 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2018-09-20 10:53:50 +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-09-20 14:10:00 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-09-20 10:53:50 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-08-29 06:26:03 +00:00
|
|
|
%define skip_python2 1
|
2018-09-20 10:53:50 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-pelican
|
2021-01-05 09:21:46 +00:00
|
|
|
Version: 4.5.4
|
2018-09-20 10:53:50 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: A tool to generate a static blog from reStructuredText or Markdown input files
|
2018-09-20 14:10:00 +00:00
|
|
|
License: AGPL-3.0-only
|
2018-09-20 10:53:50 +00:00
|
|
|
Group: Development/Languages/Python
|
2020-11-16 08:02:28 +00:00
|
|
|
URL: https://getpelican.com/
|
2020-11-23 09:52:55 +00:00
|
|
|
# Use the source instead of the pypi release for the tests
|
|
|
|
Source: https://github.com/getpelican/pelican/archive/%{version}.tar.gz
|
2020-08-29 06:26:03 +00:00
|
|
|
BuildRequires: %{python_module Jinja2 >= 2.11}
|
2020-11-23 09:52:55 +00:00
|
|
|
BuildRequires: %{python_module Markdown >= 3.1.1}
|
2018-09-20 10:53:50 +00:00
|
|
|
BuildRequires: %{python_module Pygments}
|
|
|
|
BuildRequires: %{python_module Unidecode}
|
2020-11-23 09:52:55 +00:00
|
|
|
BuildRequires: %{python_module beautifulsoup4}
|
2018-09-20 10:53:50 +00:00
|
|
|
BuildRequires: %{python_module blinker}
|
2020-08-29 06:26:03 +00:00
|
|
|
BuildRequires: %{python_module docutils >= 0.15}
|
2018-09-20 10:53:50 +00:00
|
|
|
BuildRequires: %{python_module feedgenerator >= 1.9}
|
2020-11-23 09:52:55 +00:00
|
|
|
BuildRequires: %{python_module lxml}
|
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
|
|
|
BuildRequires: %{python_module pytest}
|
2018-09-20 10:53:50 +00:00
|
|
|
BuildRequires: %{python_module python-dateutil}
|
2020-08-29 06:26:03 +00:00
|
|
|
BuildRequires: %{python_module pytz >= 0a}
|
2018-09-20 10:53:50 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2020-11-23 09:52:55 +00:00
|
|
|
BuildRequires: %{python_module typogrify}
|
2018-09-20 10:53:50 +00:00
|
|
|
BuildRequires: fdupes
|
2020-11-23 09:52:55 +00:00
|
|
|
BuildRequires: git-core
|
2018-09-20 10:53:50 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-08-29 06:26:03 +00:00
|
|
|
Requires: python-Jinja2 >= 2.11
|
2018-09-20 10:53:50 +00:00
|
|
|
Requires: python-Pygments
|
|
|
|
Requires: python-Unidecode
|
|
|
|
Requires: python-blinker
|
2020-08-29 06:26:03 +00:00
|
|
|
Requires: python-docutils >= 0.15
|
2018-09-20 10:53:50 +00:00
|
|
|
Requires: python-feedgenerator >= 1.9
|
|
|
|
Requires: python-python-dateutil
|
2020-08-29 06:26:03 +00:00
|
|
|
Requires: python-pytz >= 0a
|
2018-09-20 10:53:50 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
Suggests: asciidoc
|
2020-08-29 06:26:03 +00:00
|
|
|
Suggests: python-Markdown >= 3.1.1
|
2018-09-20 10:53:50 +00:00
|
|
|
Suggests: python-typogrify
|
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Pelican is a static site generator, written in Python.
|
|
|
|
|
|
|
|
* Write your weblog entries directly with your editor of choice in reStructuredText, Markdown or AsciiDoc
|
|
|
|
* Includes a simple CLI tool to (re)generate the weblog
|
|
|
|
* Easy to interface with DVCSes and web hooks
|
|
|
|
* Completely static output is easy to host anywhere
|
|
|
|
|
|
|
|
Pelican currently supports:
|
|
|
|
|
|
|
|
* Blog articles and pages
|
|
|
|
* Comments, via an external service
|
|
|
|
* Theming support (themes are created using Jinja2 templates)
|
|
|
|
* PDF generation of the articles/pages (optional)
|
|
|
|
* Publication of articles in multiple languages
|
|
|
|
* Atom/RSS feeds
|
|
|
|
* Code syntax highlighting
|
|
|
|
* Asset management with webassets (optional)
|
|
|
|
* Import from WordPress, Dotclear, or RSS feeds
|
|
|
|
* Integration with external tools: Twitter, Google Analytics, etc. (optional)
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n pelican-%{version}
|
2018-09-20 15:22:14 +00:00
|
|
|
|
2018-09-20 10:53:50 +00:00
|
|
|
# remove useless shebang
|
|
|
|
sed -i '1d' \
|
2018-11-14 20:20:58 +00:00
|
|
|
pelican/tools/templates/publishconf.py.jinja2 \
|
|
|
|
pelican/tools/templates/pelicanconf.py.jinja2 \
|
2018-09-20 10:53:50 +00:00
|
|
|
pelican/tools/pelican_import.py \
|
|
|
|
pelican/tools/pelican_themes.py \
|
|
|
|
pelican/tools/pelican_quickstart.py
|
|
|
|
# remove executable bit, this is not a script
|
2018-11-14 20:20:58 +00:00
|
|
|
chmod -x pelican/tools/templates/publishconf.py.jinja2
|
2018-09-20 10:53:50 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2018-12-06 12:16:51 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2018-09-20 10:53:50 +00:00
|
|
|
|
2020-08-29 06:26:03 +00:00
|
|
|
for p in pelican pelican-import pelican-plugins pelican-quickstart pelican-themes; do
|
2018-09-20 10:53:50 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/$p
|
|
|
|
done
|
|
|
|
|
2020-11-23 09:52:55 +00:00
|
|
|
%check
|
|
|
|
export LC_ALL=C.utf8
|
|
|
|
%pytest
|
|
|
|
|
2018-09-20 10:53:50 +00:00
|
|
|
%post
|
2020-08-29 06:26:03 +00:00
|
|
|
%python_install_alternative pelican pelican-import pelican-plugins pelican-quickstart pelican-themes
|
2018-09-20 10:53:50 +00:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative pelican
|
|
|
|
|
2020-11-16 08:02:28 +00:00
|
|
|
%files %{python_files}
|
2020-11-03 10:46:45 +00:00
|
|
|
%license LICENSE
|
2020-11-16 08:02:28 +00:00
|
|
|
%doc CONTRIBUTING.rst README.rst THANKS docs/*
|
2018-09-20 10:53:50 +00:00
|
|
|
%python_alternative %{_bindir}/pelican
|
|
|
|
%python_alternative %{_bindir}/pelican-import
|
2020-08-29 06:26:03 +00:00
|
|
|
%python_alternative %{_bindir}/pelican-plugins
|
2018-09-20 10:53:50 +00:00
|
|
|
%python_alternative %{_bindir}/pelican-quickstart
|
|
|
|
%python_alternative %{_bindir}/pelican-themes
|
|
|
|
%{python_sitelib}/pelican
|
|
|
|
%{python_sitelib}/pelican-%{version}-py%{python_version}.egg-info
|
|
|
|
|
|
|
|
%changelog
|