2018-09-20 10:53:50 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pelican
|
|
|
|
#
|
2022-02-09 22:47:27 +00:00
|
|
|
# Copyright (c) 2022 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
|
2022-07-15 17:51:18 +00:00
|
|
|
Version: 4.8.0
|
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
|
2021-01-29 22:08:40 +00:00
|
|
|
# Source: https://github.com/getpelican/pelican/archive/%%{version}.tar.gz
|
2021-10-22 12:33:31 +00:00
|
|
|
Source: pelican-%{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}
|
2021-07-14 14:21:49 +00:00
|
|
|
BuildRequires: %{python_module Sphinx}
|
2018-09-20 10:53:50 +00:00
|
|
|
BuildRequires: %{python_module Unidecode}
|
2020-11-23 09:52:55 +00:00
|
|
|
BuildRequires: %{python_module beautifulsoup4}
|
2021-07-14 14:21:49 +00:00
|
|
|
BuildRequires: %{python_module black}
|
|
|
|
BuildRequires: %{python_module blinker >= 1.4}
|
|
|
|
BuildRequires: %{python_module docutils >= 0.16}
|
2018-09-20 10:53:50 +00:00
|
|
|
BuildRequires: %{python_module feedgenerator >= 1.9}
|
2021-07-14 14:21:49 +00:00
|
|
|
BuildRequires: %{python_module flake8-import-order}
|
|
|
|
BuildRequires: %{python_module flake8}
|
|
|
|
BuildRequires: %{python_module invoke}
|
|
|
|
BuildRequires: %{python_module isort}
|
|
|
|
BuildRequires: %{python_module livereload}
|
2020-11-23 09:52:55 +00:00
|
|
|
BuildRequires: %{python_module lxml}
|
2021-07-14 14:21:49 +00:00
|
|
|
BuildRequires: %{python_module psutil}
|
|
|
|
BuildRequires: %{python_module pytest-cov}
|
2020-11-23 09:52:55 +00:00
|
|
|
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}
|
2021-07-14 14:21:49 +00:00
|
|
|
BuildRequires: %{python_module rich >= 10.1}
|
2018-09-20 10:53:50 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2021-07-14 14:21:49 +00:00
|
|
|
BuildRequires: %{python_module sphinx_rtd_theme}
|
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
|
2021-07-14 14:21:49 +00:00
|
|
|
BuildRequires: pandoc
|
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
|
2021-07-14 14:21:49 +00:00
|
|
|
Requires: python-rich >= 10.1
|
2018-09-20 10:53:50 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-01-29 22:08:40 +00:00
|
|
|
Requires(postun):update-alternatives
|
2018-09-20 10:53:50 +00:00
|
|
|
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
|
2021-08-10 20:50:54 +00:00
|
|
|
ExcludeArch: %{ix86}
|
2018-09-20 10:53:50 +00:00
|
|
|
%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
|
2021-01-29 22:08:40 +00:00
|
|
|
%autosetup -p1 -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' \
|
|
|
|
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
|
2022-04-29 15:59:25 +00:00
|
|
|
export PYTHONPATH=.
|
2021-07-14 14:21:49 +00:00
|
|
|
# gh#getpelican/pelican#2846
|
2021-08-10 21:11:13 +00:00
|
|
|
%pytest -k 'not (test_basic_generation_works or test_custom_generation_works or test_custom_locale_generation_works)'
|
2020-11-23 09:52:55 +00:00
|
|
|
|
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
|
2021-01-29 22:08:40 +00:00
|
|
|
%{python_sitelib}/pelican-*.egg-info
|
2018-09-20 10:53:50 +00:00
|
|
|
|
|
|
|
%changelog
|