diff --git a/RELEASING/README.md b/RELEASING/README.md index 470c890ba9a7d..1d3285e0ffc32 100644 --- a/RELEASING/README.md +++ b/RELEASING/README.md @@ -422,13 +422,47 @@ with the changes on `CHANGELOG.md` and `UPDATING.md`. ### Publishing a Convenience Release to PyPI -Using the final release tarball, unpack it and run `./pypi_push.sh`. -This script will build the JavaScript bundle and echo the twine command -allowing you to publish to PyPI. You may need to ask a fellow committer to grant +Extract the release to the `/tmp` folder to build the PiPY release. Files in the `/tmp` folder will be automatically deleted by the OS. + +```bash +mkdir -p /tmp/superset && cd /tmp/superset +tar xfvz ~/svn/superset/${SUPERSET_VERSION}/${SUPERSET_RELEASE_TARBALL} +``` + +Create a virtual environment and install the dependencies + +```bash +cd ${SUPERSET_RELEASE_RC} +python3 -m venv venv +source venv/bin/activate +pip install -r requirements/base.txt +pip install twine +``` + +Create the distribution + +```bash +cd superset-frontend/ +npm ci && npm run build +cd ../ +flask fab babel-compile --target superset/translations +python setup.py sdist +``` + +Publish to PyPI + +You may need to ask a fellow committer to grant you access to it if you don't have access already. Make sure to create an account first if you don't have one, and reference your username while requesting access to push packages. +```bash +twine upload dist/apache-superset-${SUPERSET_VERSION}.tar.gz + +# Set your username to token +# Set your password to the token value, including the pypi- prefix +``` + ### Announcing Once it's all done, an [ANNOUNCE] thread announcing the release to the dev@ mailing list is the final step. diff --git a/scripts/pypi_push.sh b/scripts/pypi_push.sh deleted file mode 100755 index 881d823fa86af..0000000000000 --- a/scripts/pypi_push.sh +++ /dev/null @@ -1,33 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Make sure you've followed the instructions on `RELEASING/README.md` -# and are on the correct branch -cd ${SUPERSET_REPO_DIR} -git branch -rm superset/static/assets/* -cd superset-frontend/ -npm ci && npm run build -cd ../ -echo "----------------------" -echo "Compiling translations" -echo "----------------------" -flask fab babel-compile --target superset/translations -echo "----------------------" -echo "Creating distribution " -echo "----------------------" -python setup.py sdist -echo "RUN: twine upload dist/apache-superset-${SUPERSET_VERSION}.tar.gz"