1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

Fix bug with pyz release on 3.8

This commit is contained in:
ksamuel 2020-08-31 17:25:18 +02:00
parent dff881ee90
commit ff6fc227eb
2 changed files with 17 additions and 8 deletions

23
dodo.py
View File

@ -1,8 +1,8 @@
import sys
import subprocess
from pathlib import Path
from fnmatch import fnmatch
from subprocess import check_output, STDOUT
from doit.tools import PythonInteractiveAction
@ -23,9 +23,9 @@ DOIT_CONFIG = {
}
def git(*args):
return check_output(
["git", *args], stderr=STDOUT, timeout=3, universal_newlines=True,
def git(*args, **kwargs):
return subprocess.check_output(
["git", *args], stderr=subprocess.STDOUT, universal_newlines=True,
).rstrip("\n")
@ -77,10 +77,16 @@ def task_build():
def task_publish_to_pypi():
return {
"task_dep": ["build"],
"file_dep": [DIST_DIR / f"zerobin-{ZEROBIN_VERSION}-py3-none-any.whl"],
"actions": ["twine upload ./dist/*.whl"],
"actions": ["echo twine upload ./dist/*.whl"],
}
def task_build_pyz():
return {
"actions": ["shiv zerobin -o dist/zerobin.pyz -c zerobin"],
}
@ -122,7 +128,10 @@ def task_bump_version():
print("- Updating VERSION file")
(SOURCE_DIR / "VERSION").write_text(new_version)
print("- Commiting VERSION file")
git("commit", "-m", f"Bumping to version {new_version}")
git("add", "zerobin/VERSION")
git(
"commit", "-m", f"Bumping to version {new_version}",
)
print(f"- Adding v{new_version} tag")
git("tag", f"v{new_version}")
print("- Pushing tag")

View File

@ -64,7 +64,7 @@ class SettingsContainer(object):
Update settings with values from the given module file.
Uses update_with_dict() behind the scenes.
"""
params = run_path(filepath)
params = run_path(str(filepath))
return self.update_with_dict(params)