From 8a349f8bfb557e1b001412a083dc7eefd6e8b073 Mon Sep 17 00:00:00 2001 From: Shivaram Venkataraman Date: Thu, 8 Dec 2016 15:11:05 -0800 Subject: [PATCH 1/4] Fix R source package name to match Spark version --- dev/make-distribution.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh index fe281bbaa2023..d0a42040a2f7d 100755 --- a/dev/make-distribution.sh +++ b/dev/make-distribution.sh @@ -222,11 +222,14 @@ fi # Make R package - this is used for both CRAN release and packing R layout into distribution if [ "$MAKE_R" == "true" ]; then echo "Building R source package" + R_PACKAGE_VERSION=`grep Version $SPARK_HOME/R/pkg/DESCRIPTION | awk '{print $NF}'` pushd "$SPARK_HOME/R" > /dev/null # Build source package and run full checks # Install source package to get it to generate vignettes, etc. # Do not source the check-cran.sh - it should be run from where it is for it to set SPARK_HOME NO_TESTS=1 CLEAN_INSTALL=1 "$SPARK_HOME/"R/check-cran.sh + # Make a copy of R source package matchin the Spark release version. + cp $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz $SPARK_HOME/R/SparkR_"$VERSION".tar.gz popd > /dev/null else echo "Skipping building R source package" From c15916aebd8e3991f45d244e298c0362785a1e81 Mon Sep 17 00:00:00 2001 From: Shivaram Venkataraman Date: Thu, 8 Dec 2016 15:32:01 -0800 Subject: [PATCH 2/4] Fix spelling --- dev/make-distribution.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh index d0a42040a2f7d..c7b801bbd99ef 100755 --- a/dev/make-distribution.sh +++ b/dev/make-distribution.sh @@ -228,7 +228,7 @@ if [ "$MAKE_R" == "true" ]; then # Install source package to get it to generate vignettes, etc. # Do not source the check-cran.sh - it should be run from where it is for it to set SPARK_HOME NO_TESTS=1 CLEAN_INSTALL=1 "$SPARK_HOME/"R/check-cran.sh - # Make a copy of R source package matchin the Spark release version. + # Make a copy of R source package matching the Spark release version. cp $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz $SPARK_HOME/R/SparkR_"$VERSION".tar.gz popd > /dev/null else From 74d779b8bdee8c6ad4aba69c051a3f9c87fecd3c Mon Sep 17 00:00:00 2001 From: Shivaram Venkataraman Date: Thu, 8 Dec 2016 16:29:57 -0800 Subject: [PATCH 3/4] Remove pip tar from distribution dir --- dev/make-distribution.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh index c7b801bbd99ef..4fe4f415696fe 100755 --- a/dev/make-distribution.sh +++ b/dev/make-distribution.sh @@ -241,6 +241,12 @@ cp "$SPARK_HOME"/conf/*.template "$DISTDIR"/conf cp "$SPARK_HOME/README.md" "$DISTDIR" cp -r "$SPARK_HOME/bin" "$DISTDIR" cp -r "$SPARK_HOME/python" "$DISTDIR" + +# Remove the python distribution from dist/ if we built it +if [ "$MAKE_PIP" == "true" ]; then + rm $DISTDIR/pyspark-*.tar.gz +fi + cp -r "$SPARK_HOME/sbin" "$DISTDIR" # Copy SparkR if it exists if [ -d "$SPARK_HOME"/R/lib/SparkR ]; then From 9b977651bdd85659fb6ab9d00e26ee0bb6ddbb52 Mon Sep 17 00:00:00 2001 From: Shivaram Venkataraman Date: Thu, 8 Dec 2016 16:57:15 -0800 Subject: [PATCH 4/4] Fix path --- dev/make-distribution.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh index 4fe4f415696fe..4da7d573849f8 100755 --- a/dev/make-distribution.sh +++ b/dev/make-distribution.sh @@ -244,7 +244,7 @@ cp -r "$SPARK_HOME/python" "$DISTDIR" # Remove the python distribution from dist/ if we built it if [ "$MAKE_PIP" == "true" ]; then - rm $DISTDIR/pyspark-*.tar.gz + rm -f $DISTDIR/python/dist/pyspark-*.tar.gz fi cp -r "$SPARK_HOME/sbin" "$DISTDIR"