diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ccf919c --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/mkdocs-0.14.0.tar.gz +/0.14.0.tar.gz +/0.15.3.tar.gz +/0.16.1.tar.gz +/0.16.3.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index 5204a84..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Orphaned for 6+ weeks diff --git a/mkdocs.1 b/mkdocs.1 new file mode 100644 index 0000000..0364be7 --- /dev/null +++ b/mkdocs.1 @@ -0,0 +1,30 @@ +.TH "MKDOCS" "1" "2015-07-10" "0.1" "William Moreno Reyes" "" +.SH "NAME" +mkdocs \- Create HTML documentation from markdown sources +.SH "SYNOPSIS" +mkdocs [build|gh\-deploy|new|serve] {options} +.SH "DESCRIPTION" +MkDocs is a fast and simple way to create a website from source files written +in Markdown, and configured with a YAML configuration file, the documentation +can be hosted anywhere, even in free hosting services like Read the Docs and +GitHub Pages. +.SH "OPTIONS" +.TP +\fB\-\-help\fP +display help and exit +.TP +\fBnew\fP +\fB\fP create a new project with under the \fI\fP directory +.TP +\fBbuild\fP +make a HTML website from sources +.TP +\fBserve\fP +start a server to view in real time the documentation +.TP +\fBgh\-deploy\fP +commit changes to a GitHub Page +.SH "AUTHOR" +MkDocs by Tom Christie and Dougal Matthews +This manpage was written for William Moreno Reyes for the Fedora Project and +be used under a CC-By License. diff --git a/mkdocs.spec b/mkdocs.spec new file mode 100644 index 0000000..0dda4b7 --- /dev/null +++ b/mkdocs.spec @@ -0,0 +1,256 @@ +Name: mkdocs +Version: 0.16.3 +Release: 10%{?dist} +Summary: Python tool to create HTML documentation from markdown sources + +License: BSD +URL: http://www.mkdocs.org/ +Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz +#https://github.com/mkdocs/mkdocs/pull/687 +Source1: mkdocs.1 +Patch0: python37.patch + +BuildArch: noarch + +BuildRequires: python3-setuptools +BuildRequires: python3-devel + +# When python3 is updated to 3.N+1, we need to bootstrap mkdocs, because it BRs self +%bcond_with bootstrap + +%if %{without bootstrap} +BuildRequires: python3-tornado +BuildRequires: python3-PyYAML +BuildRequires: python3-markdown +BuildRequires: python3-jinja2 +BuildRequires: python3-click +BuildRequires: livereload +BuildRequires: fontawesome-fonts +BuildRequires: fontawesome-fonts-web +BuildRequires: js-highlight +BuildRequires: mkdocs +BuildRequires: mkdocs-bootstrap +BuildRequires: mkdocs-bootswatch +BuildRequires: mkdocs-cinder +BuildRequires: mkdocs-material +BuildRequires: js-jquery +BuildRequires: js-jquery1 +%endif + +# Force file requeriments to avoid broken sym links. +BuildRequires: /usr/share/fonts/fontawesome/FontAwesome.otf +BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.svg +BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.ttf +BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.woff +BuildRequires: /usr/share/javascript/highlight.js/highlight.pack.js +BuildRequires: /usr/share/javascript/jquery/1.12.4/jquery.min.js +BuildRequires: /usr/share/fonts/fontawesome/FontAwesome.otf +BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.svg +BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.ttf +BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.woff +BuildRequires: /usr/share/javascript/highlight.js/highlight.pack.js +BuildRequires: /usr/share/javascript/jquery/3.2.1/jquery.min.js + +Requires: python3-tornado +Requires: python3-PyYAML +Requires: python3-markdown +Requires: python3-jinja2 +Requires: python3-click +Requires: livereload +Requires: fontawesome-fonts +Requires: fontawesome-fonts-web +Requires: js-highlight +Requires: mkdocs-bootstrap +Requires: mkdocs-bootswatch +Requires: js-jquery +Requires: js-jquery1 + +Enhances: mkdocs-alabaster +Enhances: mkdocs-cinder +Enhances: mkdocs-material + +Suggests: mkdocs-basic-theme + +%package docs +Summary: Documentantion for %{name} + +%description +MkDocs is a fast and simple way to create a website from source files written +in Markdown, and configured with a YAML configuration file, the documentation +can be hosted anywhere, even in free hosting services like Read the Docs and +GitHub Pages. + +%description docs +Documentation for %{name}. + +%prep +%autosetup -p1 -n %{name}-%{version} + +rm -rf %{name}.egg.info + +find %{_builddir}/%{name}-%{version} -name '*.py' \ + -exec sed -i '1{\@^#!/usr/bin/env python@d}' {} \; + +rm -rf mkdocs/themes/*/fonts/fontawesome-webfont.* + +rm -rf mkdocs/themes/*/js/highlight.pack.js + +sed -i 1d %{_builddir}/%{name}-%{version}/%{name}/utils/ghp_import.py + +%build +%py3_build + +%install +%py3_install + +mkdir -p %{buildroot}/%{_mandir}/man1 +install -p -m 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/ + +themes="mkdocs readthedocs" + +for theme in $themes +do +mkdir -p %{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/fonts/ +ln -sf %{_datadir}/fonts/fontawesome/FontAwesome.otf \ +%{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/fonts/ +ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.svg \ +%{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/fonts/ +ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.ttf \ +%{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/fonts/ +ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.woff \ +%{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/fonts/ +ln -sf %{_datadir}/javascript/highlight.js/highlight.pack.js \ +%{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/js/ +done + +ln -sf %{_datadir}/javascript/jquery/latest/jquery.min.js \ +%{buildroot}/%{python3_sitelib}/%{name}/themes/readthedocs/js/jquery-2.1.1.min.js + +ln -sf %{_datadir}/javascript/jquery/1/jquery.min.js \ +%{buildroot}/%{python3_sitelib}/%{name}/themes/mkdocs/js/jquery-1.10.2.min.js + +%if %{without bootstrap} +# Build docs with self and verify all works fine. +PATH=%{buildroot}%{_bindir}:$PATH +which mkdocs + +export LC_ALL=C.UTF-8 +export LANG=C.UTF-8 +touch mkdocs.yml +mkdocs build + +%check +# Verify if docs build fine with this version available. +# This help to check if all symlinks work fine. +PATH=%{buildroot}%{_bindir}:$PATH +which mkdocs +test_themes="cinder material readthedocs amelia cerulean cosmo \ +cyborg flatly journal readable simplex slate spacelab united yeti \ +bootstrap" +mkdocs new testing +pushd testing +for theme in $test_themes +do +mkdocs build --theme $theme +done +popd +%endif # without bootstrap + +%files +%doc README.md +%license LICENSE +%{_bindir}/* +%{_mandir}/man1/* +%{python3_sitelib}/%{name} +%{python3_sitelib}/%{name}-%{version}-py?.?.egg-info + +%files docs +%license LICENSE +%if %{without bootstrap} +%doc site/* +%endif + +%changelog +* Thu Jul 25 2019 Fedora Release Engineering - 0.16.3-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 0.16.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.16.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jul 09 2018 Miro Hrončok - 0.16.3-7 +- Rebuilt for Python 3.7 + +* Mon Jul 09 2018 Miro Hrončok - 0.16.3-6 +- Bootstrap for Python 3.7 +- Add patch for Python 3.7 compatibility + +* Thu Feb 08 2018 Fedora Release Engineering - 0.16.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Oct 13 2017 williamjmorenor@gmail.com - 0.16.3-4 +- Force BuildRequeriments to specific files to avoid + broken symlinks in the user system, this should catch + missing files to specific themes + +* Fri Oct 06 2017 williamjmorenor@gmail.com - 0.16.3-3 +- Build docs with self to check for broken symlinks + See: https://bugzilla.redhat.com/show_bug.cgi?id=1497654 + +* Wed Jul 26 2017 Fedora Release Engineering - 0.16.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Jun 06 2017 William Moreno - 0.16.3-1 +- Update to 0.16.3 upstream release + +* Fri Feb 10 2017 Fedora Release Engineering - 0.16.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jan 20 2017 William Moreno - 0.16.1-2 +- Bootstrapping 0.16.1 in F25 + +* Thu Jan 12 2017 William Moreno - 0.16.1-1 +- Update to v0.16.1 + +* Tue Dec 20 2016 Miro Hrončok - 0.15.3-7 +- Build the docs with self (was disabled for bootstrapping) + +* Tue Dec 20 2016 Miro Hrončok - 0.15.3-6 +- Change so it will use the available version of jquery1 + +* Mon Dec 19 2016 Miro Hrončok - 0.15.3-5 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 0.15.3-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Fri Jun 03 2016 William Moreno - 0.15.3-3 +- Unbundle jquery libs + +* Fri Apr 08 2016 William Moreno - 0.15.3-2 +- Updates requires +- List avaiables themes as enhances + +* Fri Apr 08 2016 William Moreno - 0.15.3-1 +- Update to v0.15.3 + +* Thu Feb 04 2016 Fedora Release Engineering - 0.14.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sun Nov 15 2015 William Moreno - 0.14.0-8 +- fedoraproject.org/wiki/FAD_Python_3_Porting_2015 +- disable test + +* Tue Nov 10 2015 Fedora Release Engineering - 0.14.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Fri Jul 31 2015 Fedora +- 0.14.0-6 +- Update Python macros + +* Mon Jul 27 2015 William Moreno Reyes +- 0.14.0-5 +- Initial import of #1230963 +- Fix BuildRequires diff --git a/python37.patch b/python37.patch new file mode 100644 index 0000000..c48f1c0 --- /dev/null +++ b/python37.patch @@ -0,0 +1,44 @@ +diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py +index d5e656f..4e011e7 100644 +--- a/mkdocs/config/config_options.py ++++ b/mkdocs/config/config_options.py +@@ -363,7 +363,7 @@ class Extras(OptionallyRequired): + def walk_docs_dir(self, docs_dir): + + if self.file_match is None: +- raise StopIteration ++ return + + for (dirpath, dirs, filenames) in os.walk(docs_dir): + dirs.sort() +diff --git a/mkdocs/nav.py b/mkdocs/nav.py +index fb092e6..383780e 100644 +--- a/mkdocs/nav.py ++++ b/mkdocs/nav.py +@@ -262,7 +262,7 @@ def _follow(config_line, url_context, use_dir_urls, header=None, title=None): + header.children.append(page) + + yield page +- raise StopIteration ++ return + + elif not isinstance(config_line, dict): + msg = ("Line in 'page' config is of type {0}, dict or string " +@@ -275,7 +275,7 @@ def _follow(config_line, url_context, use_dir_urls, header=None, title=None): + "config contains an invalid entry: {0}".format(config_line)) + elif len(config_line) == 0: + log.warning("Ignoring empty line in the pages config.") +- raise StopIteration ++ return + + next_cat_or_title, subpages_or_path = next(iter(config_line.items())) + +@@ -283,7 +283,7 @@ def _follow(config_line, url_context, use_dir_urls, header=None, title=None): + path = subpages_or_path + for sub in _follow(path, url_context, use_dir_urls, header=header, title=next_cat_or_title): + yield sub +- raise StopIteration ++ return + + elif not isinstance(subpages_or_path, list): + msg = ("Line in 'page' config is of type {0}, list or string " diff --git a/sources b/sources new file mode 100644 index 0000000..9c4b200 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (0.16.3.tar.gz) = f4f4d215e53c2d8089b4315ff95bd20f3397597f51b83f45de6fa837e8fb39653d501e95303b65e2e574050e2fc2b136369c1551477e150297406bc0d2e34b5a