From 1b31806423c8fec4040fed6d1009db016860b763 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 1 May 2018 20:37:51 -0400 Subject: rename inkstitch/ to lib/ You can't have a module and a package named the same thing. PyInstaller wants to import the main script as if it were a module, and this doesn't work unless there's no directory of the same name with a __init__.py in it. --- lib/utils/cache.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lib/utils/cache.py (limited to 'lib/utils/cache.py') diff --git a/lib/utils/cache.py b/lib/utils/cache.py new file mode 100644 index 00000000..38fe8f2c --- /dev/null +++ b/lib/utils/cache.py @@ -0,0 +1,8 @@ +try: + from functools import lru_cache +except ImportError: + from backports.functools_lru_cache import lru_cache + +# simplify use of lru_cache decorator +def cache(*args, **kwargs): + return lru_cache(maxsize=None)(*args, **kwargs) -- cgit v1.2.3