fix package data search

This commit is contained in:
ge 2022-09-30 12:05:57 +03:00
parent da516c96bd
commit 2c9524aa55
1 changed files with 4 additions and 4 deletions

View File

@ -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'],