diff --git a/Makefile.jinja2 b/rsw/Makefile.jinja2 similarity index 100% rename from Makefile.jinja2 rename to rsw/Makefile.jinja2 diff --git a/rsw.py b/rsw/__init__.py similarity index 98% rename from rsw.py rename to rsw/__init__.py index 8f18b58..fa4c50a 100644 --- a/rsw.py +++ b/rsw/__init__.py @@ -43,13 +43,14 @@ 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.0' +__version__ = '0.1.1' import os import sys import shutil import datetime import logging +import importlib.resources import toml import jinja2 @@ -350,7 +351,7 @@ def build(config: dict): write_to_file(html_file_path, html_page) # Copy additional files to build_dir - log.info("Copy static files from '{}' and '{}' to '{}'".format( + log.info("Copying static files from '{}' and '{}' to '{}'".format( config['dirs']['static_dir'], config['dirs']['content_dir'], config['dirs']['build_dir'])) @@ -377,6 +378,8 @@ def init(dirname: str = '.', no_makefile: bool = False): # Make Makefile if not no_makefile: makefile = render_template('Makefile.jinja2', + templates_dir = os.path.dirname( + importlib.resources.path('rsw', 'Makefile.jinja2')), content_dir = DEFAULT_CONFIG['dirs']['content_dir'], static_dir = DEFAULT_CONFIG['dirs']['static_dir'], build_dir = DEFAULT_CONFIG['dirs']['build_dir'],