summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>2017-03-17 15:33:06 +0100
committerJuergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>2017-03-17 15:33:06 +0100
commit2fc4a28de8d70058310a6951cd93849c17d50908 (patch)
tree26460287f6a48e627e3546cfd76ea9693d0e6023
parent4406ac71209f6539593f4e462fa5e6320f6ac6f2 (diff)
downloadqtivi-qface-2fc4a28de8d70058310a6951cd93849c17d50908.tar.gz
ensure the distribution folder is created if not exists and removed if exists. This is for creating a python distribution
-rwxr-xr-xcli.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli.py b/cli.py
index 9c0f4fb..fd0644d 100755
--- a/cli.py
+++ b/cli.py
@@ -166,7 +166,9 @@ def uninstall():
@cli.command()
def upload():
dist = Path('dist')
- dist.rmdir_p()
+ if dist.exists():
+ dist.rmdir_p()
+ dist.makedirs_p()
sh('python3 setup.py bdist_wheel')
sh('twine upload dist/*')