From 8d2adcd29f2cd24e3bcbced005f59234458d6f4e68828de1ca9932ae13d76407 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 26 Aug 2021 05:43:25 +0000 Subject: [PATCH] Accepting request 913564 from home:jengelh:branches:devel:languages:python looking at other packages, I found the way to use fdupes without double-percent. - Trim conjecture from description. Use multi-file find -exec. - Make fdupes actually functional. OBS-URL: https://build.opensuse.org/request/show/913564 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mkdocs?expand=0&rev=2 --- python-mkdocs.changes | 6 ++++++ python-mkdocs.spec | 32 ++++++++++++++++++-------------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/python-mkdocs.changes b/python-mkdocs.changes index 6152421..234e80f 100644 --- a/python-mkdocs.changes +++ b/python-mkdocs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Aug 14 21:50:43 UTC 2021 - Jan Engelhardt + +- Trim conjecture from description. Use multi-file find -exec. +- Make fdupes actually functional. + ------------------------------------------------------------------- Wed May 19 18:13:47 UTC 2021 - Matthias Mailänder diff --git a/python-mkdocs.spec b/python-mkdocs.spec index 9a94b4e..a5fe2b5 100644 --- a/python-mkdocs.spec +++ b/python-mkdocs.spec @@ -25,14 +25,16 @@ License: BSD-2-Clause Group: Development/Languages/Python URL: https://www.mkdocs.org Source: https://github.com/mkdocs/mkdocs/archive/%{version}.tar.gz -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module tox} BuildRequires: %{python_module click} BuildRequires: %{python_module flake8} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module tox} BuildRequires: fdupes -BuildRequires: python-rpm-macros BuildRequires: fontawesome-fonts BuildRequires: fontawesome-fonts-web +BuildRequires: python-rpm-macros +Requires: fontawesome-fonts +Requires: fontawesome-fonts-web Requires: python-Jinja2 Requires: python-Markdown Requires: python-PyYAML @@ -40,24 +42,22 @@ Requires: python-click Requires: python-ghp-import Requires: python-livereload Requires: python-tornado -Requires: fontawesome-fonts -Requires: fontawesome-fonts-web Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(postun):update-alternatives BuildArch: noarch %python_subpackages %description -MkDocs is a fast, simple and downright gorgeous static site generator that's -geared towards building project documentation. Documentation source files are -written in Markdown, and configured with a single YAML configuration file. +MkDocs is a static site generator for building project documentation. +Documentation source files are written in Markdown, and configured +with a single YAML configuration file. %prep -%setup -q -n mkdocs-%{version} +%autosetup -n mkdocs-%{version} # Get rid of shebangs. -find . -type f -name "*.py" -exec sed -i '/#!\/usr\/bin\/env/d' {} \; -find . -type f -name "*.svg" -exec chmod -x {} \; +find . -type f -name "*.py" -exec sed -i '/#!\/usr\/bin\/env/d' {} + +find . -type f -name "*.svg" -exec chmod -x {} + %build %python_build @@ -66,8 +66,6 @@ find . -type f -name "*.svg" -exec chmod -x {} \; %python_install %python_clone -a %{buildroot}%{_bindir}/mkdocs -%python_expand %fdupes -s %{buildroot}%{python_sitelib} - # unbundle where possible %if 0%{?suse_version} <= 1500 rm %{buildroot}%{python_sitelib}/mkdocs/themes/mkdocs/fonts/fontawesome-webfont.woff @@ -80,6 +78,12 @@ rm %{buildroot}%{python_sitelib}/mkdocs/themes/readthedocs/fonts/fontawesome-web ln -sf %{_datadir}/fonts/truetype/fontawesome-webfont.ttf %{buildroot}%{python_sitelib}/mkdocs/themes/readthedocs/fonts/fontawesome-webfont.ttf %endif +# inconsistent permissions prohibited fdupes from being effective +find "%{buildroot}" -type f "(" -name "*.eot" -o -name "*.ttf" -o \ + -name "*.woff" ")" -exec chmod a-x {} + + +%python_expand %fdupes -s %{buildroot}/%{$python_sitelib} + %check # tries to download stuff at runtime #tox