Skip to content

Commit ff6fc22

Browse files
committedAug 31, 2020
Fix bug with pyz release on 3.8
1 parent dff881e commit ff6fc22

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed
 

‎dodo.py

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import sys
2+
import subprocess
23

34
from pathlib import Path
45
from fnmatch import fnmatch
5-
from subprocess import check_output, STDOUT
66

77
from doit.tools import PythonInteractiveAction
88

@@ -23,9 +23,9 @@
2323
}
2424

2525

26-
def git(*args):
27-
return check_output(
28-
["git", *args], stderr=STDOUT, timeout=3, universal_newlines=True,
26+
def git(*args, **kwargs):
27+
return subprocess.check_output(
28+
["git", *args], stderr=subprocess.STDOUT, universal_newlines=True,
2929
).rstrip("\n")
3030

3131

@@ -77,10 +77,16 @@ def task_build():
7777

7878

7979
def task_publish_to_pypi():
80+
8081
return {
8182
"task_dep": ["build"],
82-
"file_dep": [DIST_DIR / f"zerobin-{ZEROBIN_VERSION}-py3-none-any.whl"],
83-
"actions": ["twine upload ./dist/*.whl"],
83+
"actions": ["echo twine upload ./dist/*.whl"],
84+
}
85+
86+
87+
def task_build_pyz():
88+
return {
89+
"actions": ["shiv zerobin -o dist/zerobin.pyz -c zerobin"],
8490
}
8591

8692

@@ -122,7 +128,10 @@ def bump():
122128
print("- Updating VERSION file")
123129
(SOURCE_DIR / "VERSION").write_text(new_version)
124130
print("- Commiting VERSION file")
125-
git("commit", "-m", f"Bumping to version {new_version}")
131+
git("add", "zerobin/VERSION")
132+
git(
133+
"commit", "-m", f"Bumping to version {new_version}",
134+
)
126135
print(f"- Adding v{new_version} tag")
127136
git("tag", f"v{new_version}")
128137
print("- Pushing tag")

‎zerobin/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def update_with_file(self, filepath):
6464
Update settings with values from the given module file.
6565
Uses update_with_dict() behind the scenes.
6666
"""
67-
params = run_path(filepath)
67+
params = run_path(str(filepath))
6868
return self.update_with_dict(params)
6969

7070

0 commit comments

Comments
 (0)