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

lresende pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-toree.git

commit fe82c6b8def5344c0d61fd0f91e473becb4c935c
Author: Luciano Resende <[email protected]>
AuthorDate: Mon Sep 6 14:39:42 2021 -0700

    Produce apache-toree pip distribution
    
    The new incubator release policy requires that
    podlings distribute packages under apache-<name>.
    
    For now, this produces both pip packages for backward
    compatibility purposes.
---
 Makefile                   | 36 ++++++++++++++++++++++++++----------
 etc/tools/release-build.sh |  9 +++++++++
 2 files changed, 35 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index d0268d9..90aad1d 100644
--- a/Makefile
+++ b/Makefile
@@ -47,11 +47,6 @@ docker run -t --rm \
        -v `pwd`:/srv/toree $(DOCKER_ARGS)
 endef
 
-define GEN_PIP_PACKAGE_INFO
-printf "__version__ = '$(BASE_VERSION)'\n" >> dist/toree-pip/toree/_version.py
-printf "__commit__ = '$(COMMIT)'\n" >> dist/toree-pip/toree/_version.py
-endef
-
 USE_VAGRANT?=
 RUN_PREFIX=$(if $(USE_VAGRANT),vagrant ssh -c "cd $(VM_WORKDIR) && )
 RUN_SUFFIX=$(if $(USE_VAGRANT),")
@@ -231,17 +226,38 @@ dist/toree-pip/toree-$(BASE_VERSION).tar.gz: dist/toree
        @cp dist/toree/RELEASE_NOTES.md dist/toree-pip/RELEASE_NOTES.md
        @cp -R dist/toree/licenses dist/toree-pip/licenses
        @cp -rf etc/pip_install/* dist/toree-pip/.
-       @$(GEN_PIP_PACKAGE_INFO)
+       printf "__version__ = '$(BASE_VERSION)'\n" >> 
dist/toree-pip/toree/_version.py
+       printf "__commit__ = '$(COMMIT)'\n" >> dist/toree-pip/toree/_version.py
+       @$(DOCKER) --user=root $(IMAGE) python setup.py sdist --dist-dir=.
+       @$(DOCKER) -p 8888:8888 --user=root     $(IMAGE) bash -c 'pip install 
toree-$(BASE_VERSION).tar.gz && jupyter toree install'
+
+dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz: 
DOCKER_WORKDIR=/srv/toree/dist/apache-toree-pip
+dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz: dist/toree
+       @mkdir -p dist/apache-toree-pip
+       @cp -r dist/toree dist/apache-toree-pip
+       @cp dist/toree/LICENSE dist/apache-toree-pip/LICENSE
+       @cp dist/toree/NOTICE dist/apache-toree-pip/NOTICE
+       @cp dist/toree/DISCLAIMER dist/apache-toree-pip/DISCLAIMER
+       @cp dist/toree/VERSION dist/apache-toree-pip/VERSION
+       @cp dist/toree/RELEASE_NOTES.md dist/apache-toree-pip/RELEASE_NOTES.md
+       @cp -R dist/toree/licenses dist/apache-toree-pip/licenses
+       @cp -rf etc/pip_install/* dist/apache-toree-pip/.
+       @printf "__version__ = '$(BASE_VERSION)'\n" >> 
dist/apache-toree-pip/toree/_version.py
+       @printf "__commit__ = '$(COMMIT)'\n" >> 
dist/apache-toree-pip/toree/_version.py
+       @sed -i -e "s#name='toree'#name='apache-toree'#g" 
dist/apache-toree-pip/setup.py
        @$(DOCKER) --user=root $(IMAGE) python setup.py sdist --dist-dir=.
-       @$(DOCKER) -p 8888:8888 --user=root     $(IMAGE) bash -c        'pip 
install toree-$(BASE_VERSION).tar.gz && jupyter toree install'
-#      -@(cd dist/toree-pip; find . -not -name 'toree-$(VERSION).tar.gz' 
-maxdepth 1 | xargs rm -r )
+       @$(DOCKER) -p 8888:8888 --user=root     $(IMAGE) bash -c 'pip install 
apache-toree-$(BASE_VERSION).tar.gz && jupyter toree install'
 
-pip-release: dist/toree-pip/toree-$(BASE_VERSION).tar.gz
+
+pip-release: dist/toree-pip/toree-$(BASE_VERSION).tar.gz 
dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
 
 dist/toree-pip/toree-$(BASE_VERSION).tar.gz.md5 
dist/toree-pip/toree-$(BASE_VERSION).tar.gz.asc 
dist/toree-pip/toree-$(BASE_VERSION).tar.gz.sha512: 
dist/toree-pip/toree-$(BASE_VERSION).tar.gz
        @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file 
dist/toree-pip/toree-$(BASE_VERSION).tar.gz
 
-sign-pip: dist/toree-pip/toree-$(BASE_VERSION).tar.gz.md5 
dist/toree-pip/toree-$(BASE_VERSION).tar.gz.asc 
dist/toree-pip/toree-$(BASE_VERSION).tar.gz.sha512
+dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.md5 
dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.asc 
dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.sha512: 
dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
+       @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file 
dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
+
+sign-pip: dist/toree-pip/toree-$(BASE_VERSION).tar.gz.md5 
dist/toree-pip/toree-$(BASE_VERSION).tar.gz.asc 
dist/toree-pip/toree-$(BASE_VERSION).tar.gz.sha512 
dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.md5 
dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.asc 
dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.sha512
 
 publish-pip: DOCKER_WORKDIR=/srv/toree/dist/toree-pip
 publish-pip: PYPI_REPO?=https://pypi.python.org/pypi
diff --git a/etc/tools/release-build.sh b/etc/tools/release-build.sh
index 1f6a6fa..a2c4391 100755
--- a/etc/tools/release-build.sh
+++ b/etc/tools/release-build.sh
@@ -260,11 +260,14 @@ if [[ "$RELEASE_PREPARE" == "true" ]]; then
         svn co $RELEASE_STAGING_LOCATION svn-toree
         mkdir -p svn-toree/$RELEASE_STAGING_FOLDER/toree
         mkdir -p svn-toree/$RELEASE_STAGING_FOLDER/toree-pip
+        mkdir -p svn-toree/$RELEASE_STAGING_FOLDER/apache-toree-pip
 
         cp toree/dist/toree-bin/*.tar.gz 
svn-toree/$RELEASE_STAGING_FOLDER/toree
         cp toree/dist/toree-src/*.tar.gz 
svn-toree/$RELEASE_STAGING_FOLDER/toree
         cp toree/dist/toree-pip/*.tar.gz 
svn-toree/$RELEASE_STAGING_FOLDER/toree-pip
         cp -r toree/dist/toree-pip/toree.egg-info 
svn-toree/$RELEASE_STAGING_FOLDER/toree-pip/
+        cp toree/dist/apache-toree-pip/*.tar.gz 
svn-toree/$RELEASE_STAGING_FOLDER/apache-toree-pip
+        cp -r toree/dist/apache-toree-pip/toree.egg-info 
svn-toree/$RELEASE_STAGING_FOLDER/apache-toree-pip/
 
         cd "$BASE_DIR/target/svn-toree/$RELEASE_STAGING_FOLDER/toree"
         rm -f *.asc
@@ -278,6 +281,12 @@ if [[ "$RELEASE_PREPARE" == "true" ]]; then
         rm -f *.sha*
         for i in *.tar.gz; do shasum --algorithm 512 $i > $i.sha512; done
 
+        cd 
"$BASE_DIR/target/svn-toree/$RELEASE_STAGING_FOLDER/apache-toree-pip"
+        rm -f *.asc
+        for i in *.tar.gz; do gpg --output $i.asc --detach-sig --armor $i; done
+        rm -f *.sha*
+        for i in *.tar.gz; do shasum --algorithm 512 $i > $i.sha512; done
+
         cd "$BASE_DIR/target/svn-toree/" #exit $RELEASE_STAGING_FOLDER/
 
         svn add $RELEASE_STAGING_FOLDER/

Reply via email to