cd <project/path/here/package_name>
(for /D %a in ("<package_name>.egg-info" "build" "dist") do rd /s /q %~a
) - if directory not cleaned (step 4)
(python -m pip install --upgrade build
) - if not already installed
python -m build
(python -m pip install --user --upgrade twine
) - if not already installed
python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
for /D %a in ("<package_name>.egg-info" "build" "dist") do rd /s /q %~a
cd <project/path/here/package_name>
python -m build
python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
for /D %a in ("<package_name>.egg-info" "build" "dist") do rd /s /q %~a