From 949940cc27f68bc8e2e17347783322d4a3086dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Piln=C3=A1=C4=8Dek?= Date: Sun, 28 Oct 2018 12:06:18 +0100 Subject: [PATCH] Move logo to a separate file --- MANIFEST.in | 1 + bonobo/__init__.py | 6 ++++-- bonobo/bonobo.svg | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 bonobo/bonobo.svg diff --git a/MANIFEST.in b/MANIFEST.in index f0e3359..6277daa 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ include *.txt +include bonobo/bonobo.svg recursive-include bonobo *.py-tpl diff --git a/bonobo/__init__.py b/bonobo/__init__.py index 35dc5c9..76f96a3 100644 --- a/bonobo/__init__.py +++ b/bonobo/__init__.py @@ -6,6 +6,7 @@ # Licensed under Apache License 2.0, read the LICENSE file in the root of the source tree. import sys +from pathlib import Path if sys.version_info < (3, 5): raise RuntimeError("Python 3.5+ is required to use Bonobo.") @@ -52,7 +53,8 @@ from bonobo._api import ( from bonobo._version import __version__ __all__ = ["__version__"] + __all__ -__logo__ = '' +with (Path(__file__).parent / "bonobo.svg").open() as f: + __logo__ = f.read() __doc__ = __doc__ __version__ = __version__ @@ -69,4 +71,4 @@ def _repr_html_(): ).format(__logo__, "
".join(get_versions(all=True))) -del sys +del sys, Path, f diff --git a/bonobo/bonobo.svg b/bonobo/bonobo.svg new file mode 100644 index 0000000..c81b1b4 --- /dev/null +++ b/bonobo/bonobo.svg @@ -0,0 +1 @@ +