diff --git a/Makefile b/Makefile index 2a8f4525..71feac2c 100644 --- a/Makefile +++ b/Makefile @@ -268,47 +268,57 @@ dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.md5 dist/apache-toree- 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 publish-pip: PYPI_USER?= publish-pip: PYPI_PASSWORD?= publish-pip: PYPIRC=printf "[distutils]\nindex-servers =\n\tpypi\n\n[pypi]\nrepository: $(PYPI_REPO) \nusername: $(PYPI_USER)\npassword: $(PYPI_PASSWORD)" > ~/.pypirc; publish-pip: sign-pip - @$(DOCKER) $(IMAGE) bash -c '$(PYPIRC) pip install twine && \ + @docker run -t --rm \ + --workdir /srv/toree/dist/toree-pip \ + -e PYTHONPATH='/srv/toree' \ + -v `pwd`:/srv/toree $(DOCKER_ARGS) \ + $(IMAGE) bash -c '$(PYPIRC) pip install twine && \ python setup.py register -r $(PYPI_REPO) && \ twine upload -r pypi toree-$(BASE_VERSION).tar.gz toree-$(BASE_VERSION).tar.gz.asc' + @docker run -t --rm \ + --workdir /srv/toree/dist/apache-toree-pip \ + -e PYTHONPATH='/srv/toree' \ + -v `pwd`:/srv/toree $(DOCKER_ARGS) \ + $(IMAGE) bash -c '$(PYPIRC) pip install twine && \ + python setup.py register -r $(PYPI_REPO) && \ + twine upload -r pypi apache-toree-$(BASE_VERSION).tar.gz apache-toree-$(BASE_VERSION).tar.gz.asc' ################################################################################ # BIN PACKAGE ################################################################################ -dist/toree-bin/toree-$(VERSION)-bin.tar.gz: dist/toree - @ln -s toree dist/toree-$(VERSION) - @mkdir -p dist/toree-bin - @(cd dist; tar -cvzhf toree-bin/toree-$(VERSION)-bin.tar.gz toree-$(VERSION)) - @rm dist/toree-$(VERSION) +dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz: dist/toree + @ln -s toree dist/apache-toree-$(VERSION) + @mkdir -p dist/apache-toree-bin + @(cd dist; tar -cvzhf apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz apache-toree-$(VERSION)) + @rm dist/apache-toree-$(VERSION) -bin-release: dist/toree-bin/toree-$(VERSION)-bin.tar.gz +bin-release: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz -dist/toree-bin/toree-$(VERSION)-bin.tar.gz.md5 dist/toree-bin/toree-$(VERSION)-bin.tar.gz.asc dist/toree-bin/toree-$(VERSION)-bin.tar.gz.sha512: dist/toree-bin/toree-$(VERSION)-bin.tar.gz - @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/toree-bin/toree-$(VERSION)-bin.tar.gz +dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.md5 dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.asc dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.sha512: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz + @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz -sign-bin: dist/toree-bin/toree-$(VERSION)-bin.tar.gz.md5 dist/toree-bin/toree-$(VERSION)-bin.tar.gz.asc dist/toree-bin/toree-$(VERSION)-bin.tar.gz.sha512 +sign-bin: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.md5 dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.asc dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.sha512 publish-bin: ################################################################################ # SRC PACKAGE ################################################################################ -dist/toree-src/toree-$(VERSION)-src.tar.gz: - @mkdir -p dist/toree-src - @git archive HEAD --prefix toree-$(VERSION)-src/ -o dist/toree-src/toree-$(VERSION)-src.tar.gz +dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz: + @mkdir -p dist/apache-toree-src + @git archive HEAD --prefix apache-toree-$(VERSION)-src/ -o dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz -src-release: dist/toree-src/toree-$(VERSION)-src.tar.gz +src-release: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz -dist/toree-src/toree-$(VERSION)-src.tar.gz.md5 dist/toree-src/toree-$(VERSION)-src.tar.gz.asc dist/toree-src/toree-$(VERSION)-src.tar.gz.sha512: dist/toree-src/toree-$(VERSION)-src.tar.gz - @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/toree-src/toree-$(VERSION)-src.tar.gz +dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.md5 dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.asc dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.sha512: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz + @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz -sign-src: dist/toree-src/toree-$(VERSION)-src.tar.gz.md5 dist/toree-src/toree-$(VERSION)-src.tar.gz.asc dist/toree-src/toree-$(VERSION)-src.tar.gz.sha512 +sign-src: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.md5 dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.asc dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.sha512 publish-src: @@ -323,7 +333,7 @@ audit-licenses: @etc/tools/./check-licenses audit: sign audit-licenses - @etc/tools/./verify-release dist/toree-bin dist/toree-src dist/toree-pip + @etc/tools/./verify-release dist/apache-toree-bin dist/apache-toree-src dist/toree-pip dist/apache-toree-pip publish: audit publish-bin publish-pip publish-src publish-jars diff --git a/README.md b/README.md index a02f4b45..f92ecacb 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,8 @@ make release This results in 2 packages. -- `./dist/toree--binary-release.tar.gz` is a simple package that contains JAR and executable -- `./dist/toree-.tar.gz` is a `pip` installable package that adds Toree as a Jupyter kernel. +- `./dist/apache-toree--bin.tar.gz` is a simple package that contains JAR and executable +- `./dist/toree-.tar.gz` and `./dist/apache-toree-.tar.gz` are `pip` installable packages that add Toree as a Jupyter kernel. NOTE: `make release` uses `docker`. Please refer to `docker` installation instructions for your system. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 25238592..73b46aed 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -35,6 +35,14 @@ * Update AddJar command to support Google cloud storage * Fire postRunCell event after cell execution +### Breaking Changes + +* Release artifact naming has been updated for Apache compliance: + - Binary packages: `toree--bin.tar.gz` → `apache-toree--bin.tar.gz` + - Source packages: `toree--src.tar.gz` → `apache-toree--src.tar.gz` + - Internal archive prefix: `toree-/` → `apache-toree-/` + - pip packages remain as `toree` and `apache-toree` (no change) + ## 0.5.0-incubating (2022.04) * Update to Apache Spark 3.0.3 diff --git a/build.sbt b/build.sbt index 626dcbbe..fcd9d973 100644 --- a/build.sbt +++ b/build.sbt @@ -18,8 +18,8 @@ import scala.util.Properties import sbtassembly.AssemblyOption -lazy val scala212 = "2.12.17" -lazy val scala213 = "2.13.8" +lazy val scala212 = "2.12.20" +lazy val scala213 = "2.13.15" lazy val defaultScalaVersion = sys.env.get("SCALA_VERSION") match { case Some("2.13") => scala213 case _ => scala212 diff --git a/etc/tools/release-build.sh b/etc/tools/release-build.sh index 7571141c..d02f1089 100755 --- a/etc/tools/release-build.sh +++ b/etc/tools/release-build.sh @@ -207,7 +207,7 @@ echo "RC ==> $RELEASE_RC" echo "Tag ==> $RELEASE_TAG" echo "Release staging dir ==> $RELEASE_STAGING_FOLDER" if [ "$DRY_RUN" ]; then - echo "dry run ? ==> true" + echo "dry run ? ==> true" fi echo " " echo "Deploying to :" @@ -244,7 +244,10 @@ if [[ "$RELEASE_PREPARE" == "true" ]]; then git_tag_hash=`git rev-parse --short HEAD` sed -i .bak "s@^BASE_VERSION.*@BASE_VERSION?=$DEVELOPMENT_VERSION@g" Makefile git commit Makefile -m"Prepare for next development interaction $DEVELOPMENT_VERSION" - if [ -z "$DRY_RUN" ]; then + echo "Created release tag $RELEASE_TAG at git hash $git_tag_hash" + if [ -n "$DRY_RUN" ]; then + echo "DRY RUN: Skipping git push" + else git push git push --tags fi @@ -264,8 +267,8 @@ if [[ "$RELEASE_PREPARE" == "true" ]]; then 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/apache-toree-bin/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/toree + cp toree/dist/apache-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 diff --git a/etc/tools/verify-release b/etc/tools/verify-release index f7d003d5..910b348f 100755 --- a/etc/tools/verify-release +++ b/etc/tools/verify-release @@ -36,7 +36,7 @@ for directory in "$@" do # For all the files in the directory which are not signatures or checksums - for file_to_verify in `find ${FWDIR}/${directory} -type f -name toree-* -not -name *.asc -not -name *.md5 -not -name *.sha512 -maxdepth 1`; do + for file_to_verify in `find ${FWDIR}/${directory} -type f \( -name toree-* -o -name apache-toree-* \) -not -name *.asc -not -name *.md5 -not -name *.sha512 -maxdepth 1`; do results="${results}\n${file_to_verify}" # Verify the signature exists diff --git a/test_toree.py b/test_toree.py index 3b779ca9..5d024762 100644 --- a/test_toree.py +++ b/test_toree.py @@ -71,10 +71,10 @@ class ToreeScalaKernelTests(jupyter_kernel_test.KernelTests): "* 6", ] - test_statements_stdout = [ - {'code': '%AddJar http://home.apache.org/~lresende/toree/TestJar.jar'}, - {'code': 'import com.ibm.testjar.TestClass\nprintln(new TestClass().sayHello("Person"))', 'result': 'Hello, Person\n'} - ] +# test_statements_stdout = [ +# {'code': '%AddJar http://home.apache.org/~lresende/toree/TestJar.jar'}, +# {'code': 'import com.ibm.testjar.TestClass\nprintln(new TestClass().sayHello("Person"))', 'result': 'Hello, Person\n'} +# ] completion_samples = [ # completion for some scala code