You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2022/10/06 22:55:23 UTC

[iceberg] branch master updated: Python: Update release instructions (#5856)

This is an automated email from the ASF dual-hosted git repository.

blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new f1e0d327a3 Python: Update release instructions (#5856)
f1e0d327a3 is described below

commit f1e0d327a391417a309a8b6e21881d983394ea77
Author: Fokko Driesprong <fo...@apache.org>
AuthorDate: Fri Oct 7 00:55:15 2022 +0200

    Python: Update release instructions (#5856)
---
 python/dev/RELEASE.md | 84 +++++++++++++++++++++++----------------------------
 1 file changed, 37 insertions(+), 47 deletions(-)

diff --git a/python/dev/RELEASE.md b/python/dev/RELEASE.md
index 03ec767808..b0513f341c 100644
--- a/python/dev/RELEASE.md
+++ b/python/dev/RELEASE.md
@@ -19,76 +19,56 @@
 
 # How to release
 
-The guide to release the Python package.
+The guide to release PyIceberg.
 
-First we're going to release a release candidate (RC) and publish it to the public to test. Once the vote has passed on the RC, we can release the new version.
+First we're going to release a release candidate (RC) and publish it to the public for testing and validation. Once the vote has passed on the RC, we can release the new version.
 
 ## Running a release candidate
 
 Make sure that you're on the version that you want to release.
 
 ```bash
-export RC=rc0
-export VERSION=0.0.1.${RC}
+export RC=rc1
+export VERSION=0.1.0${RC}
 export VERSION_WITHOUT_RC=${VERSION/rc?/}
 export VERSION_BRANCH=${VERSION_WITHOUT_RC//./-}
+export GIT_TAG=pyiceberg-${VERSION}
 
-git checkout -b apache-iceberg-python-${VERSION_BRANCH}
+git tag -s ${GIT_TAG} -m "PyIceberg ${VERSION}"
+git push apache ${GIT_TAG}
 
-git tag -s ${VERSION} -m "Apache Iceberg Python ${VERSION}"
-
-export GIT_TAG=$(git show-ref ${VERSION})
-export GIT_TAG_HASH=${GIT_TAG:0:40}
-export LAST_COMMIT_ID=$(git rev-list ${VERSION} 2> /dev/null | head -n 1)
+export GIT_TAG_REF=$(git show-ref ${GIT_TAG})
+export GIT_TAG_HASH=${GIT_TAG_REF:0:40}
+export LAST_COMMIT_ID=$(git rev-list ${GIT_TAG} 2> /dev/null | head -n 1)
 ```
 
 The `-s` option will sign the commit. If you don't have a key yet, you can find the instructions [here](http://www.apache.org/dev/openpgp.html#key-gen-generate-key). To install gpg on a M1 based Mac, a couple of additional steps are required: https://gist.github.com/phortuin/cf24b1cca3258720c71ad42977e1ba57
 
-Next we'll create a source distribution (`sdist`) which will generate a `.tar.gz` with all the source files.
-
-```bash
-# Update the version
-poetry version ${VERSION}
+Next we'll create a source distribution (`sdist`) which will generate a `.tar.gz` with all the source files. So we can upload the files to the Apache SVN.
 
-git diff pyiceberg/__init__.py
-git add pyiceberg/__init__.py
-git commit -s -m "Set to version ${VERSION}"
 ```
-
-Now we can stage the version in pypi and upload the files to the Apache SVN.
-
-Next we're going to build the artifacts:
-
-```bash
-rm -rf dist/
 poetry build
 ```
 
 This will create two artifacts:
 
 ```
-Building apache-iceberg (0.1.0)
+Building pyiceberg (0.1.0)
   - Building sdist
-  - Built apache-iceberg-0.1.0.tar.gz
+  - Built pyiceberg-0.1.0.tar.gz
   - Building wheel
   - Built apache_iceberg-0.1.0-py3-none-any.whl
 ```
 
 The `sdist` contains the source which can be used for checking licenses, and the wheel is a compiled version for quick installation.
 
-Next, we can upload them to pypi. Please keep in mind that this **won't** bump the version for everyone that hasn't pinned their version, since it is RC [pre-release and those are ignored](https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#pre-release-versioning).
-
-```
-twine upload dist/*
-```
-
-Before committing the files to the Apache SVN artifact distribution SVN, we need to generate hashes, and we need t o sign them using gpg:
+Before committing the files to the Apache SVN artifact distribution SVN, we need to generate hashes, and we need to sign them using gpg:
 
 ```bash
-for name in "apache_iceberg-${VERSION}-py3-none-any.whl" "apache-iceberg-${VERSION}.tar.gz"
+for name in "pyiceberg-${VERSION_WITHOUT_RC}-py3-none-any.whl" "pyiceberg-${VERSION_WITHOUT_RC}.tar.gz"
 do
     gpg --yes --armor --local-user fokko@apache.org --output "dist/${name}.asc" --detach-sig "dist/${name}"
-    shasum -a 512 "dist/${name}" > "dist/${name}.sha512"
+    (cd dist/ && shasum -a 512 "${name}" > "${name}.sha512")
 done
 ```
 
@@ -98,11 +78,20 @@ Next, we'll clone the Apache SVN, copy and commit the files:
 export SVN_TMP_DIR=/tmp/iceberg-${VERSION_BRANCH}/
 svn checkout https://dist.apache.org/repos/dist/dev/iceberg $SVN_TMP_DIR
 
-export SVN_TMP_DIR_VERSIONED=${SVN_TMP_DIR}apache-iceberg-$VERSION/
+export SVN_TMP_DIR_VERSIONED=${SVN_TMP_DIR}pyiceberg-$VERSION/
 mkdir -p $SVN_TMP_DIR_VERSIONED
 cp dist/* $SVN_TMP_DIR_VERSIONED
 svn add $SVN_TMP_DIR_VERSIONED
-svn ci -m "Apache Iceberg ${VERSION}" ${SVN_TMP_DIR_VERSIONED}
+svn ci -m "PyIceberg ${VERSION}" ${SVN_TMP_DIR_VERSIONED}
+```
+
+Next, we can upload them to pypi. Please keep in mind that this **won't** bump the version for everyone that hasn't pinned their version, we set it to a RC [pre-release and those are ignored](https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#pre-release-versioning).
+
+```
+poetry version ${VERSION}
+rm -rf dist/
+poetry build
+twine upload -s dist/*
 ```
 
 Finally, we can generate the email what we'll send to the mail list:
@@ -110,20 +99,20 @@ Finally, we can generate the email what we'll send to the mail list:
 ```bash
 cat << EOF > release-announcement-email.txt
 To: dev@iceberg.apache.org
-Subject: [VOTE] Release Apache Iceberg Python Client $VERSION
+Subject: [VOTE] Release Apache PyIceberg $VERSION_WITHOUT_RC
 Hi Everyone,
 
-I propose that we release the following RC as the official Apache Iceberg Python Client $VERSION release.
+I propose that we release the following RC as the official PyIceberg $VERSION_WITHOUT_RC release.
 
 The commit ID is $LAST_COMMIT_ID
 
-* This corresponds to the tag: $GIT_TAG_HASH
-* https://github.com/apache/iceberg/commits/apache-iceberg-python-$VERSION_BRANCH
-* https://github.com/apache/iceberg/tree/$GIT_TAG_HASH
+* This corresponds to the tag: $GIT_TAG ($GIT_TAG_HASH)
+* https://github.com/apache/iceberg/releases/tag/$GIT_TAG
+* https://github.com/apache/iceberg/tree/$LAST_COMMIT_ID
 
 The release tarball, signature, and checksums are here:
 
-* https://dist.apache.org/repos/dist/dev/iceberg/apache-iceberg-python-$VERSION/
+* https://dist.apache.org/repos/dist/dev/iceberg/pyiceberg-$VERSION/
 
 You can find the KEYS file here:
 
@@ -131,13 +120,14 @@ You can find the KEYS file here:
 
 Convenience binary artifacts are staged on pypi:
 
-https://pypi.org/project/apache-iceberg/$VERSION/
+https://pypi.org/project/pyiceberg/$VERSION/
 
-And can be installed using: pip install apache-iceberg==$VERSION
+And can be installed using: pip3 install pyiceberg==$VERSION
 
 Please download, verify, and test.
+
 Please vote in the next 72 hours.
-[ ] +1 Release this as Apache Iceberg Python Client $VERSION
+[ ] +1 Release this as PyIceberg $VERSION
 [ ] +0
 [ ] -1 Do not release this because...
 EOF