From 456d72d8b1fb4af56ae3e6b466115c438ef0ae54 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mar 28 2018 13:50:47 +0000 Subject: Make python-beaker an optional dependency Mako can work fine without beaker. Beaker is the preferred caching backend, so the Fedora package should pull it in by default, but it should also be possible to disable it in more restricted environments. Notes: * Beaker is not mentioned as a dependency in setup.py. * Technically the optional dependency works by having imports like the following (from mako/ext/beaker_cache.py): try: from beaker import cache as beaker_cache except: has_beaker = False else: has_beaker = True --- diff --git a/python-mako.spec b/python-mako.spec index 72c8e3b..43c64bb 100644 --- a/python-mako.spec +++ b/python-mako.spec @@ -6,7 +6,7 @@ Name: python-mako Version: 1.0.6 -Release: 8%{?dist} +Release: 9%{?dist} BuildArch: noarch # Mostly MIT, but _ast_util.py is Python licensed. @@ -50,7 +50,10 @@ calling and scoping semantics. %package -n python2-mako Summary: %summary Requires: python2-markupsafe -Requires: python2-beaker + +# Beaker is the preferred caching backend, but is not strictly necessary +Recommends: python2-beaker + %{?python_provide:%python_provide python2-mako} %description -n python2-mako %_description @@ -78,9 +81,11 @@ This package contains documentation in text and HTML formats. %package -n python3-mako Summary: Mako template library for Python 3 Group: Development/Languages -Requires: python3-beaker Requires: python3-markupsafe +# Beaker is the preferred caching backend, but is not strictly necessary +Recommends: python3-beaker + %description -n python3-mako Mako is a template library written in Python. It provides a familiar, non-XML syntax which compiles into Python modules for maximum performance. Mako's @@ -158,6 +163,9 @@ popd %changelog +* Wed Mar 28 2018 Petr Viktorin - 1.0.6-9 +- Make python-beaker an optional dependency + * Mon Feb 12 2018 Iryna Shcherbina - 1.0.6-8 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)