diff --git a/rsw/__init__.py b/rsw/__init__.py index fa4c50a..f6ede5c 100644 --- a/rsw/__init__.py +++ b/rsw/__init__.py @@ -43,14 +43,13 @@ This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. """ -__version__ = '0.1.1' +__version__ = '0.1.2' import os import sys import shutil import datetime import logging -import importlib.resources import toml import jinja2 @@ -377,9 +376,10 @@ def init(dirname: str = '.', no_makefile: bool = False): # Make Makefile if not no_makefile: + # Get package dir `this_dir` + this_dir, this_filename = os.path.split(__file__) makefile = render_template('Makefile.jinja2', - templates_dir = os.path.dirname( - importlib.resources.path('rsw', 'Makefile.jinja2')), + templates_dir = this_dir, content_dir = DEFAULT_CONFIG['dirs']['content_dir'], static_dir = DEFAULT_CONFIG['dirs']['static_dir'], build_dir = DEFAULT_CONFIG['dirs']['build_dir'],