Skip to content

Commit f5961cf

Browse files
committed
Update publish.py to explicitly install setuptools
setuptools is not installed by default in a venv when using Python 3.12 or higher. Below that, it'll already be there so install just won't do anything.
1 parent c8635fd commit f5961cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

publish.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ async def upload_with_twine(
5757
}
5858

5959
python_path = os.path.join(virtualenv_dir, "bin", "python")
60+
pip_path = os.path.join(virtualenv_dir, "bin", "pip")
6061
twine_path = os.path.join(virtualenv_dir, "bin", "twine")
6162

6263
# Create source distribution and wheel.
64+
await call([pip_path, "install", "setuptools"], env=environ, cwd=project_dir)
6365
await call([python_path, "setup.py", "sdist"], env=environ, cwd=project_dir)
6466
await call([python_path, "setup.py", "bdist_wheel"], env=environ, cwd=project_dir)
6567
dist_files = os.listdir(os.path.join(project_dir, "dist"))

0 commit comments

Comments
 (0)