d30ccf4
%if 0%{?fedora} > 12
d30ccf4
%global with_python3 1
d30ccf4
%endif
d30ccf4
c1f76b1
%global pypi_name pelican
c1f76b1
%{!?__python2:%global __python2 %{__python}}
c1f76b1
Name:           python-%{pypi_name}
663111c
Version:        3.6.3
d1b5b33
Release:        4%{?dist}
c1f76b1
Summary:        A tool to generate a static blog from reStructuredText or Markdown input files
c1f76b1
c1f76b1
License:        AGPLv3
c1f76b1
URL:            http://getpelican.com/
c1f76b1
Source0:        https://github.com/getpelican/pelican/archive/%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz
c1f76b1
c1f76b1
BuildArch:      noarch
a7e8d2b
f6d2d53
%description
f6d2d53
Pelican is a static site generator, written in Python_.
f6d2d53
f6d2d53
* Write your weblog entries directly with your editor of choice (vim!)
f6d2d53
  in reStructuredText_ or Markdown_
f6d2d53
* Includes a simple CLI tool to ...
f6d2d53
f6d2d53
f6d2d53
%package -n python2-%{pypi_name}
f6d2d53
Summary:        A tool to generate a static blog from reStructuredText or Markdown input files
f6d2d53
fe83de4
Obsoletes: python-%{pypi_name} < 3.6.3-3
f6d2d53
c1f76b1
BuildRequires:  python-devel
c1f76b1
BuildRequires:  python-sphinx
c1f76b1
BuildRequires:  python-blinker
c1f76b1
BuildRequires:  python-unidecode
c1f76b1
c1f76b1
BuildRequires:  python-mock
c1f76b1
BuildRequires:  python-markdown
c1f76b1
BuildRequires:  python-beautifulsoup4
c1f76b1
BuildRequires:  python-lxml
c1f76b1
BuildRequires:  python-six
c1f76b1
BuildRequires:  pytz
c1f76b1
BuildRequires:  python-jinja2
c1f76b1
BuildRequires:  python-django
b9bd960
BuildRequires:  python-dateutil
d30ccf4
BuildRequires:  python-nose
d30ccf4
BuildRequires:  python-nose-cov
c1f76b1
c1f76b1
Requires:  python-blinker
c1f76b1
Requires:  python-six
c1f76b1
Requires:  python-unidecode
c1f76b1
Requires:  python-jinja2
c1f76b1
Requires:  pytz
c1f76b1
Requires:  python-pygments
c1f76b1
Requires:  python-docutils
c1f76b1
Requires:  python-django
a7e8d2b
Requires:  python-markdown
c246d3d
Requires:  python-feedparser
e93322d
Requires:  python-dateutil
c1f76b1
c1f76b1
f6d2d53
%description -n python2-%{pypi_name}
c1f76b1
Pelican is a static site generator, written in Python_.
c1f76b1
c1f76b1
* Write your weblog entries directly with your editor of choice (vim!)
c1f76b1
  in reStructuredText_ or Markdown_
c1f76b1
* Includes a simple CLI tool to ...
c1f76b1
d30ccf4
%if 0%{?with_python3}
d30ccf4
%package -n python3-%{pypi_name}
d30ccf4
Summary:        A tool to generate a static blog from reStructuredText or Markdown input files
d30ccf4
d30ccf4
BuildRequires:  python3-devel
d30ccf4
BuildRequires:  python3-blinker
d30ccf4
BuildRequires:  python3-unidecode
d30ccf4
d30ccf4
BuildRequires:  python3-mock
d30ccf4
BuildRequires:  python3-markdown
d30ccf4
BuildRequires:  python3-beautifulsoup4
d30ccf4
BuildRequires:  python3-lxml
d30ccf4
BuildRequires:  python3-six
d30ccf4
BuildRequires:  python3-pytz
d30ccf4
BuildRequires:  python3-jinja2
d30ccf4
BuildRequires:  python3-django
d30ccf4
BuildRequires:  python3-dateutil
d30ccf4
d30ccf4
Requires:  python3-blinker
d30ccf4
Requires:  python3-six
d30ccf4
Requires:  python3-unidecode
d30ccf4
Requires:  python3-jinja2
d30ccf4
Requires:  python3-pytz
d30ccf4
Requires:  python3-pygments
d30ccf4
Requires:  python3-docutils
d30ccf4
Requires:  python3-django
d30ccf4
Requires:  python3-markdown
d30ccf4
Requires:  python3-feedparser
d30ccf4
Requires:  python3-dateutil
d30ccf4
d30ccf4
d30ccf4
%description -n python3-%{pypi_name}
d30ccf4
Pelican is a static site generator, written in Python_.
d30ccf4
d30ccf4
* Write your weblog entries directly with your editor of choice (vim!)
d30ccf4
  in reStructuredText_ or Markdown_
d30ccf4
* Includes a simple CLI tool to ...
d30ccf4
d30ccf4
%endif
d30ccf4
c1f76b1
c1f76b1
%prep
d30ccf4
%setup -qc
d30ccf4
mv %{pypi_name}-%{version} python2
d30ccf4
pushd python2
d30ccf4
d30ccf4
# copy LICENSE etc. to top level dir
d30ccf4
cp -a LICENSE ..
d30ccf4
cp -a README.rst ..
d30ccf4
c1f76b1
# Remove bundled egg-info
c1f76b1
rm -rf %{pypi_name}.egg-info
c1f76b1
c1f76b1
# make file not zero length to silence rpmlint
c1f76b1
echo " " > pelican/themes/simple/templates/tag.html
c1f76b1
c1f76b1
# remove bagpath #!/usr/bin/env from files
c1f76b1
sed -i '1d' pelican/tools/pelican_import.py
c1f76b1
sed -i '1d' pelican/tools/pelican_quickstart.py
c1f76b1
sed -i '1d' pelican/tools/pelican_themes.py
c1f76b1
sed -i '1d' pelican/tools/templates/pelicanconf.py.in
c1f76b1
c1f76b1
# substitute feedgenerator with it's original django
c1f76b1
sed -i 's|feedgenerator|django.utils.feedgenerator|' pelican/writers.py
c1f76b1
sed -i "s|'feedgenerator >= 1.6', ||" setup.py
2fe6e20
sed -i "s|'pytz >= 0a'|'pytz'|" setup.py
d30ccf4
popd
d30ccf4
d30ccf4
%if 0%{?with_python3}
d30ccf4
cp -a python2 python3
d30ccf4
%endif
c1f76b1
c1f76b1
c1f76b1
%build
d30ccf4
pushd python2
c1f76b1
%{__python2} setup.py build
c1f76b1
c1f76b1
# build docs
c1f76b1
sphinx-build docs html
c1f76b1
c1f76b1
# remove leftovers from sphinxbuild
c1f76b1
rm html/_downloads/theme-basic.zip html/_static/theme-basic.zip
c1f76b1
rm -rf html/.doctrees html/.buildinfo
c1f76b1
d30ccf4
mv html ..
d30ccf4
popd
d30ccf4
d30ccf4
%if 0%{?with_python3}
d30ccf4
pushd python3
d30ccf4
%{__python3} setup.py build
d30ccf4
popd
d30ccf4
%endif
c1f76b1
c1f76b1
%install
d30ccf4
%if 0%{?with_python3}
d30ccf4
pushd python3
d30ccf4
%{__python3} setup.py install --skip-build --root %{buildroot}
d30ccf4
popd
d30ccf4
# rename helpers
d30ccf4
mv %{buildroot}/%{_bindir}/pelican %{buildroot}/%{_bindir}/py3-pelican
d30ccf4
mv %{buildroot}/%{_bindir}/pelican-import %{buildroot}/%{_bindir}/py3-pelican-import
d30ccf4
mv %{buildroot}/%{_bindir}/pelican-quickstart %{buildroot}/%{_bindir}/py3-pelican-quickstart
d30ccf4
mv %{buildroot}/%{_bindir}/pelican-themes %{buildroot}/%{_bindir}/py3-pelican-themes
d30ccf4
%endif
d30ccf4
d30ccf4
d30ccf4
pushd python2
c1f76b1
%{__python2} setup.py install --skip-build --root %{buildroot}
663111c
popd
d30ccf4
c1f76b1
c1f76b1
%check
c246d3d
# disable tests for now. they are a bit unstable due comparing
c246d3d
# html attributes via diff. Failed several times, when attributes
c246d3d
# were ordered differently!
d30ccf4
#pushd python2
d30ccf4
#nosetests -sv --with-coverage --cover-package=pelican pelican
d30ccf4
#popd
c1f76b1
f6d2d53
%files -n python2-%{pypi_name}
2cf40cf
%doc html README.rst
2cf40cf
%license LICENSE
c1f76b1
%{_bindir}/pelican
c1f76b1
%{_bindir}/pelican-import
c1f76b1
%{_bindir}/pelican-quickstart
c1f76b1
%{_bindir}/pelican-themes
d30ccf4
%{python2_sitelib}/%{pypi_name}
d30ccf4
%{python2_sitelib}/%{pypi_name}-*-py?.?.egg-info
d30ccf4
d30ccf4
d30ccf4
%if 0%{?with_python3}
d30ccf4
%files -n python3-pelican
2cf40cf
%doc html README.rst
2cf40cf
%license LICENSE
d30ccf4
%{_bindir}/py3-pelican
d30ccf4
%{_bindir}/py3-pelican-import
d30ccf4
%{_bindir}/py3-pelican-quickstart
d30ccf4
%{_bindir}/py3-pelican-themes
d30ccf4
%{python3_sitelib}/%{pypi_name}
d30ccf4
%{python3_sitelib}/%{pypi_name}-*-py?.?.egg-info
d30ccf4
%endif
d30ccf4
c1f76b1
c1f76b1
%changelog
d1b5b33
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.3-4
d1b5b33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d1b5b33
fe83de4
* Mon Nov 16 2015 Matthias Runge <mrunge@redhat.com> - 3.6.3-3
f6d2d53
- properly provide python2-pelican (rhbz#1282229)
f6d2d53
e77fcd1
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.3-2
e77fcd1
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
e77fcd1
fe83de4
663111c
* Wed Nov 04 2015 Matthias Runge <mrunge@redhat.com> - 3.6.3-1
663111c
- update to 3.6.3
663111c
d30ccf4
* Mon Jun 22 2015 Matthias Runge <mrunge@redhat.com> - 3.6.0-1
d30ccf4
- update to 3.6.0
d30ccf4
- add python3 support (rhbz#1227982)
d30ccf4
9ea19a7
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.0-4
9ea19a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9ea19a7
2fe6e20
* Fri Apr 17 2015 Matthias Runge <mrunge@redhat.com> - 3.5.0-3
2fe6e20
- change requirements for pytz
2fe6e20
e93322d
* Mon Mar 23 2015 Matthias Runge <mrunge@redhat.com> - 3.5.0-2
e93322d
- add runtime requirement python-dateutil(rhbz#1204791)
e93322d
52a9fdc
* Tue Mar 10 2015 Matthias Runge <mrunge@redhat.com> - 3.5.0-1
52a9fdc
- update to 3.5.0 (rhbz#1200030)
52a9fdc
c246d3d
* Mon Sep 01 2014 Matthias Runge <mrunge@redhat.com> - 3.4.0-1
c246d3d
- update to 3.4.0
c246d3d
- add requires: python-feedparser (rhbz#1135665)
c246d3d
dcdfe44
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-5
dcdfe44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
dcdfe44
a7e8d2b
* Mon Apr 21 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 3.3.0-4
a7e8d2b
- add Requires: python-markdown
a7e8d2b
c1f76b1
* Wed Feb 05 2014 Matthias Rugne <mrunge@redhat.com> - 3.3.0-3
c1f76b1
- use __python2 instead of __python
c1f76b1
- use a tarball from github, as it significantly differs from pypi
c1f76b1
- add tests
c1f76b1
- build docs
c1f76b1
c1f76b1
c1f76b1
* Sat Jan 25 2014 Matthias Runge <mrunge@redhat.com> - 3.3-1
c1f76b1
- Initial package.