Skip to content

Commit

Permalink
Minor configuration cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
buffer committed Jan 3, 2023
1 parent 4dae511 commit 81de540
Show file tree
Hide file tree
Showing 110 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
recursive-include thug *
recursive-include conf *
recursive-exclude thug *.pyc
recursive-exclude tests *
include requirements.txt
global-exclude *.py[cod]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ funding = "https://buffer.github.io/thug/"

[tool.setuptools.packages.find]
exclude = [
"build*",
"docker*",
"docs*",
"tests*",
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ class thug_install(install):
def run(self):
if not os.path.exists(THUG_GLOBAL_CONFIG_DIR):
try:
shutil.copytree("conf",
shutil.copytree("thug/conf",
THUG_GLOBAL_CONFIG_DIR,
dirs_exist_ok = True)
except PermissionError:
if not os.path.exists(THUG_USER_CONFIG_DIR):
shutil.copytree("conf",
shutil.copytree("thug/conf",
THUG_USER_CONFIG_DIR,
dirs_exist_ok = True)

for folder in (THUG_GLOBAL_CONFIG_DIR, THUG_USER_CONFIG_DIR, ):
if os.path.exists(folder) and os.access(folder, os.X_OK | os.W_OK):
shutil.copy("conf/inspector.json", f"{folder}/inspector.json")
shutil.copytree("conf/personalities", f"{folder}/personalities", dirs_exist_ok = True)
shutil.copytree("conf/scripts", f"{folder}/scripts", dirs_exist_ok = True)
shutil.copy("thug/conf/inspector.json", f"{folder}/inspector.json")
shutil.copytree("thug/conf/personalities", f"{folder}/personalities", dirs_exist_ok = True)
shutil.copytree("thug/conf/scripts", f"{folder}/scripts", dirs_exist_ok = True)

install.run(self)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 81de540

Please sign in to comment.