%global srcname nikola Name: python-nikola Version: 7.7.12 Release: 1%{?dist} Summary: A static website and blog generator License: MIT URL: http://getnikola.com Source0: https://github.com/getnikola/nikola/archive/v%{version}.tar.gz Patch0: 0001-adjust-requires-for-f24-2016-07-23.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python3-devel BuildRequires: python3-setuptools # test requires (for python 2) BuildRequires: python2-mock BuildRequires: python2-coverage BuildRequires: python2-pytest BuildRequires: python2-pytest-cov BuildRequires: python-freezegun # BuildRequires: python2-coveralls == 2.5.0 BuildRequires: python2-colorama BuildRequires: python-lxml BuildRequires: libxslt-devel BuildRequires: python2-pillow BuildRequires: python-husl BuildRequires: python2-requests BuildRequires: python2-markdown BuildRequires: python-jinja2 BuildRequires: python2-natsort BuildRequires: python-blinker BuildRequires: python-logbook BuildRequires: python-PyRSS2Gen BuildRequires: python2-yapsy BuildRequires: python-unidecode BuildRequires: python-mako BuildRequires: python-docutils BuildRequires: python2-dateutil BuildRequires: python2-pillow BuildRequires: python-pygments BuildRequires: python-doit # test requires (for python 3) BuildRequires: python3-mock BuildRequires: python3-coverage BuildRequires: python3-pytest BuildRequires: python3-pytest-cov BuildRequires: python3-freezegun # BuildRequires: python3-coveralls == 2.5.0 BuildRequires: python3-colorama BuildRequires: python3-lxml BuildRequires: libxslt-devel BuildRequires: python3-pillow BuildRequires: python3-husl BuildRequires: python3-requests BuildRequires: python3-markdown BuildRequires: python3-jinja2 BuildRequires: python3-natsort BuildRequires: python3-blinker BuildRequires: python3-logbook BuildRequires: python3-PyRSS2Gen BuildRequires: python3-yapsy BuildRequires: python3-unidecode BuildRequires: python3-mako BuildRequires: python3-docutils BuildRequires: python3-dateutil BuildRequires: python3-pillow BuildRequires: python3-pygments BuildRequires: python3-doit %description Nikola is a static site and blog generator using Python. It generates sites with tags, feeds, archives, comments, and more from plain text files. Source can be unformatted, or formatted with reStructuredText or Markdown. It also automatically builds image galleries. %package -n python2-%{srcname} Summary: A static website and blog generator %{?python_provide:%python_provide python2-%{srcname}} Obsoletes: python-%{srcname} < 7.7.11-1 %description -n python2-%{srcname} Nikola is a static site and blog generator using Python. It generates sites with tags, feeds, archives, comments, and more from plain text files. Source can be unformatted, or formatted with reStructuredText or Markdown. It also automatically builds image galleries. Requires: python-doit Requires: python-pygments Requires: python2-pillow Requires: python2-dateutil Requires: python-docutils Requires: python-mako Requires: python-unidecode Requires: python-lxml Requires: python2-yapsy Requires: python-PyRSS2Gen Requires: python-logbook Requires: python-blinker Requires: python2-natsort Requires: python2-requests Requires: python-husl Requires: glyphicons-halflings-fonts %package -n python2-nikola-extras Summary: Extra functionality for python2-nikola Provides: python-nikola-extras = %{version}-%{release} Obsoletes: python-%{srcname}-extras < 7.7.11-1 #begin optional dependencies Requires: python2-nikola == %{version} Requires: python2-requests Requires: python2-markdown Requires: python-jinja2 # Requires: python2-micawber >= 0.3.0 Requires: python-pygal # Requires: python2-typogriphy >= 2.0.4 # Requires: python2-phpserialize >= 1.3 Requires: python-webassets Requires: python2-jupyter_core Requires: python2-nbformat # Requires: python2-ghpimport2 >= 1.0.0 # Requires: python2-ws4py == 0.3.4 Requires: python-watchdog Requires: python-pyphen # python-pyphen requires hyphen to work (see bz#1147012) Requires: hyphen-en %description -n python2-nikola-extras This package adds optional dependencies for python-nikola, expanding functionality. %package -n python3-nikola Summary: A static website and blog generator using Python3 %{?python_provide:%python_provide python3-%{srcname}} Requires: python3-doit Requires: python3-pygments Requires: python3-pillow Requires: python3-dateutil Requires: python3-docutils Requires: python3-mako Requires: python3-unidecode Requires: python3-lxml Requires: python3-yapsy Requires: python3-PyRSS2Gen Requires: python3-logbook Requires: python3-blinker Requires: python3-natsort Requires: python3-requests Requires: python3-husl Requires: glyphicons-halflings-fonts %description -n python3-nikola Nikola is a static site and blog generator using Python. It generates sites with tags, feeds, archives, comments, and more from plain text files. Source can be unformatted, or formatted with reStructuredText or Markdown. It also automatically builds image galleries. %package -n python3-nikola-extras Summary: Extra functionality for python3-nikola #begin optional dependencies Requires: python3-nikola == %{version} Requires: python3-requests Requires: python3-markdown Requires: python3-jinja2 # Requires: python3-micawber >= 0.3.0 Requires: python3-pygal # Requires: python3-typogriphy >= 2.0.4 # Requires: python3-phpserialize >= 1.3 Requires: python3-webassets Requires: python3-jupyter_core Requires: python3-nbformat # Requires: python3-ghpimport2 >= 1.0.0 # Requires: python3-ws4py == 0.3.4 Requires: python3-watchdog Requires: python3-pyphen # python-pyphen requires hyphen to work (see bz#1147012) Requires: hyphen-en %description -n python3-nikola-extras This package adds optional dependencies for python3-nikola, expanding functionality. %package -n python-nikola-doc Summary: Documentation for Nikola, a static site generator %description -n python-nikola-doc python-nikola-doc contains detailed usage instructions for Nikola, a static website and blog generator in python. %prep %setup -qn nikola-%{version} %patch0 -p1 %build %py2_build %py3_build echo "This is a stub package to provide optional dependencies for nikola" > README.extras %install # There's renaming here to accomodate both python2 and python3. The unversioned symlinks # assume python2 as the default; these should be re-evaluated if python3 becomes default. %py2_install mv %{buildroot}/%{_bindir}/nikola %{buildroot}/%{_bindir}/nikola2 mv %{buildroot}/%{_mandir}/man1/nikola.1.gz %{buildroot}/%{_mandir}/man1/nikola2.1.gz rm -rf %{buildroot}/%{python2_sitelib}/nikola/data/themes/bootstrap3/assets/fonts ln -s %{_datadir}/fonts/glyphicons-halflings \ %{buildroot}/%{python2_sitelib}/nikola/data/themes/bootstrap3/assets/fonts ## communicated to upstream, fix pending: #find %{buildroot}/%{python2_sitelib}/nikola/ -name \*.py -execdir sed -i -e '/^#!\/usr\/bin\/python$/d' {} \; #find %{buildroot}/%{python2_sitelib}/nikola/ -type f -execdir chmod a-x {} \; ## %py3_install mv %{buildroot}/%{_bindir}/nikola %{buildroot}/%{_bindir}/nikola3 find %{buildroot}/%{python3_sitelib}/nikola/ -name \*.py -execdir sed -i -e '/^#!\/usr\/bin\/python$/d' {} \; find %{buildroot}/%{python3_sitelib}/nikola/ -type f -execdir chmod a-x {} \; mv %{buildroot}/%{_mandir}/man1/nikola.1.gz %{buildroot}/%{_mandir}/man1/nikola3.1.gz ls rm -rf %{buildroot}/%{python3_sitelib}/nikola/data/themes/bootstrap3/assets/fonts ln -s %{_datadir}/fonts/glyphicons-halflings \ %{buildroot}/%{python3_sitelib}/nikola/data/themes/bootstrap3/assets/fonts rm -rf %{buildroot}%{_datadir}/doc/nikola ln -s %{_bindir}/nikola2 %{buildroot}/%{_bindir}/nikola ln -s %{_mandir}/man1/nikola2.1.gz %{buildroot}/%{_mandir}/man1/nikola.1.gz %check # The import of wordpress pages does not work because we do not have # python-phpserialize available in Fedora cd tests mv test_command_import_wordpress.py command_import_wordpress.py cd .. # disable tests for the moment as it requires python-piexif # that is not yet available on Fedora # # %{__python2} setup.py test # %{__python3} setup.py test %files -n python2-%{srcname} %{_bindir}/nikola %{_bindir}/nikola2 %{python2_sitelib}/Nikola-%{version}-py%{python2_version}.egg-info %{python2_sitelib}/nikola %license LICENSE.txt %doc AUTHORS.txt CHANGES.txt CONTRIBUTING.rst README.rst %{_mandir}/man1/nikola2* %{_mandir}/man1/nikola.1.gz %files -n python3-nikola %{_bindir}/nikola3 %{python3_sitelib}/Nikola-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/nikola %license LICENSE.txt %doc AUTHORS.txt CHANGES.txt CONTRIBUTING.rst README.rst %{_mandir}/man1/nikola3* %files -n python-nikola-doc %doc docs/*.txt %files -n python2-nikola-extras %doc README.extras %files -n python3-nikola-extras %doc README.extras %changelog * Sat Aug 6 2016 José Matos - 7.7.12-1 - updated to 7.7.12 - add obsoletes to python-nikola2 to obsolete python-nikola (the same for -extras) * Tue Jul 26 2016 José Matos - 7.7.11-3 - Fix requires for packages that do not explicitly provide a python2- subpackage * Sun Jul 24 2016 José Matos - 7.7.11-2 - python-pygal still does not provides python2-pygal (revert change) * Fri Jul 22 2016 José Matos - 7.7.11-1 - update to 7.7.11 - drop upstream patch * Wed Jul 6 2016 José Matos - 7.7.9-3 - update package to follow the python packaging guidelines * Sat Jul 2 2016 José Matos - 7.7.9-2 - fix pyphen issues (require hyphen-en and use upstream patch, see bz#1268039 for further details) - add %%license tag - update requirements - create binaries for nikola2 (built with python2) and nikola3 (built with python3) and follow the same convention for man pages * Fri Jul 1 2016 José Matos - 7.7.9-1 - update to 7.7.9 * Thu Feb 04 2016 Fedora Release Engineering - 7.7.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Sun Jan 10 2016 Pete Travis - 7.7.4-1 - Bump to latest upstream, info at https://github.com/getnikola/nikola/releases/tag/v7.7.3 - Do tests. * Sat Nov 14 2015 Pete Travis - 7.7.3-1 - Bump to latest upstream, info at https://github.com/getnikola/nikola/releases/tag/v7.7.3 * Wed Aug 26 2015 Pete Travis - 7.7.3-1 - Bump to latest upstream, info at https://github.com/getnikola/nikola/releases/tag/v7.7.3 * Wed Aug 26 2015 Pete Travis - 7.6.4-1 - Bump to latest upstream, info at https://github.com/getnikola/nikola/releases/tag/v7.6.4 * Thu Jun 18 2015 Fedora Release Engineering - 7.3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Apr 04 2015 Pete Travis - 7.3.1-2 - Fix manpage handling * Sat Apr 04 2015 Pete Travis - 7.3.1-1 - Update to upstream 7.3.1 - Primarily a bugfix release, refer to https://github.com/getnikola/nikola/releases/tag/v7.3.1 * Wed Feb 25 2015 Pete Travis - 7.3.0-5 - Stop removing empty files, really. * Tue Feb 24 2015 Pete Travis - 7.3.0-4 - comment out python-ghp-import requires, pacakge review pending. * Tue Feb 10 2015 Pete Travis - 7.3.0-3 - leave some empty files so all the modules load. * Sun Jan 18 2015 Pete Travis - 7.3.0-2 - Add python-ghp-import to extras * Sun Jan 18 2015 Pete Travis - 7.3.0-1 - Update to upstream 7.3.0 * Fri Nov 21 2014 Pete Travis - 7.2.0-2 - drop versioned requirements on python-setuptools * Sat Nov 08 2014 Pete Travis 7.2.0-1 - Update to upstream 7.2.0, see https://github.com/getnikola/nikola/releases/tag/v7.2.0 * Sat Jun 07 2014 Fedora Release Engineering - 6.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 28 2014 Kalev Lember - 6.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 * Wed Mar 12 2014 Pete Travis 6.4.0-1 - Update to upstream 6.4.0, see https://github.com/getnikola/nikola/releases/tag/v6.4.0 - Add python-colorama to Requires * Mon Feb 17 2014 Pete Travis 6.3.0-1 - Update to upstream 6.3.0, see https://github.com/getnikola/nikola/releases/tag/v6.3.0 - Added python-pygal and python-webassets to -extras * Sun Nov 10 2013 Pete Travis 6.2.1-1 - Update to upstream 6.2.1, see https://github.com/getnikola/nikola/releases/tag/v6.2.1 - Added -extras subpackage; optional dependencies for added value. * Sat Oct 26 2013 Pete Travis 6.0.4-2 - Installing manpages for all appropriate subpackages, and ensuring they match their binaries. - Adding package docs to subpackages. - Ensure build environments for python2 and python3 packages don't get mixed up. * Fri Oct 04 2013 Pete Travis 6.0.4-1 - Updating to upstream release 6.0.4 - bugfix release, details included in package. - Changed source to use main project github, getnikola, instead of primary developer's branch. - Added subpackage for documentation. - Provide python3 support in subpackage. * Sun Sep 22 2013 Pete Travis 6.0.1-1 - Updating to upstream release 6.0.1. - The release includes numerous bugfixes and feature improvents. See CHANGES.txt for details. * Mon Aug 19 2013 Pete Travis 5.5.1-1 - Initial packaging