From 3fe43e683c4a13c6f93dfcbaec207c5aeedf2f17 Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" Date: Wed, 8 Jun 2022 16:36:08 -0300 Subject: [PATCH 1/2] chore: Updates the final steps of the release README --- RELEASING/README.md | 40 +++++++++++++++++++++++++++++++++++++--- scripts/pypi_push.sh | 33 --------------------------------- 2 files changed, 37 insertions(+), 36 deletions(-) delete mode 100755 scripts/pypi_push.sh diff --git a/RELEASING/README.md b/RELEASING/README.md index 470c890ba9a7d..5f6e72a007a1f 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 +cd /tmp +tar xfvz ~/svn/superset/${SUPERSET_VERSION}/${SUPERSET_RELEASE_TARBALL} +``` + +Create a virtual environment and install the dependencies + +```bash +cd ${SUPERSET_RELEASE_RC} +virtualenv 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" From c6529d091546b02bb4015013f03b2187cf944434 Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" <70410625+michael-s-molina@users.noreply.github.com> Date: Fri, 10 Jun 2022 08:22:59 -0300 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Yongjie Zhao --- RELEASING/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASING/README.md b/RELEASING/README.md index 5f6e72a007a1f..1d3285e0ffc32 100644 --- a/RELEASING/README.md +++ b/RELEASING/README.md @@ -425,7 +425,7 @@ with the changes on `CHANGELOG.md` and `UPDATING.md`. 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 -cd /tmp +mkdir -p /tmp/superset && cd /tmp/superset tar xfvz ~/svn/superset/${SUPERSET_VERSION}/${SUPERSET_RELEASE_TARBALL} ``` @@ -433,7 +433,7 @@ Create a virtual environment and install the dependencies ```bash cd ${SUPERSET_RELEASE_RC} -virtualenv venv +python3 -m venv venv source venv/bin/activate pip install -r requirements/base.txt pip install twine