Skip to content

Commit

Permalink
Merge pull request #569 from camptocamp/mkdir-p
Browse files Browse the repository at this point in the history
Fix publish
  • Loading branch information
sbrunner authored May 9, 2022
2 parents 372f413 + d490a40 commit 3ad55b5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions c2cciutils/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def pip(
dist = os.path.join(cwd, 'dist')
if not os.path.exists(dist):
os.mkdir(dist)
if os.path.exists("setup.py"):
if os.path.exists(os.path.join(cwd, "setup.py")):
cmd = ["python3", "./setup.py", "egg_info", "--no-date"]
cmd += (
["--tag-build=dev" + datetime.datetime.now().strftime("%Y%m%d%H%M%S")]
Expand All @@ -278,8 +278,7 @@ def pip(
)
cmd.append("bdist_wheel")
else:
cwd = os.path.join(cwd, 'dist')
os.mkdir(cwd)
os.mkdir(dist)
cmd = ["pip", "wheel", "--no-deps", "--wheel-dir=dist", '.']
cmd = package.get("build_command", cmd)
subprocess.check_call(cmd, cwd=cwd, env=env)
Expand Down

0 comments on commit 3ad55b5

Please sign in to comment.