Skip to content

Commit

Permalink
handle case where file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
rmorshea committed Mar 15, 2023
1 parent bf86c61 commit 6a4c947
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,10 @@ def prepare_python_release(session: Session) -> Callable[[bool], None]:
"PYPI_USERNAME and PYPI_PASSWORD environment variables must be set"
)

rmtree("build")
rmtree("dist")
for build_dir_name in ["build", "dist"]:
build_dir_path = Path.cwd() / build_dir_name
if build_dir_path.exists():
rmtree(str(build_dir_path))

install_requirements_file(session, "build-pkg")
session.run("python", "-m", "build", "--sdist", "--wheel", "--outdir", "dist", ".")
Expand Down

0 comments on commit 6a4c947

Please sign in to comment.