Skip to content

Conversation

@srowen
Copy link
Member

@srowen srowen commented Jul 17, 2020

What changes were proposed in this pull request?

Use /usr/bin/env python3 consistently instead of /usr/bin/env python in build scripts, to reliably select Python 3.

Why are the changes needed?

Scripts no longer work with Python 2.

Does this PR introduce any user-facing change?

No, should be all build system changes.

How was this patch tested?

Existing tests / NA

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

fokkodriesprong@Fan spark % grep -R "env python" . 
./python/pyspark/version.py:#!/usr/bin/env python3
./python/pyspark/find_spark_home.py:#!/usr/bin/env python3
./python/setup.py:#!/usr/bin/env python3
./python/run-tests.py:#!/usr/bin/env python3
./dev/create-release/releaseutils.py:#!/usr/bin/env python3
./dev/create-release/generate-contributors.py:#!/usr/bin/env python3
./dev/create-release/translate-contributors.py:#!/usr/bin/env python3
./dev/github_jira_sync.py:#!/usr/bin/env python3
./dev/merge_spark_pr.py:#!/usr/bin/env python3
./dev/run-tests-jenkins.py:#!/usr/bin/env python3
./dev/run-tests.py:#!/usr/bin/env python3

@holdenk
Copy link
Contributor

holdenk commented Jul 17, 2020

LGTM, just ran into needing this ~30 minutes ago on one of my laptops :)

@SparkQA
Copy link

SparkQA commented Jul 17, 2020

Test build #126071 has finished for PR 29151 at commit ce84970.

  • This patch fails PySpark pip packaging tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member Author

srowen commented Jul 17, 2020

Jenkins retest this please

@SparkQA
Copy link

SparkQA commented Jul 18, 2020

Test build #126079 has finished for PR 29151 at commit ce84970.

  • This patch fails PySpark pip packaging tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@holdenk
Copy link
Contributor

holdenk commented Jul 18, 2020 via email

Copy link
Contributor

@HeartSaVioR HeartSaVioR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This should be helpful when you encounter the issue on merging PR who has non-ascii char in their name/email. Possibly also for PR title/description as well.

@srowen
Copy link
Member Author

srowen commented Jul 18, 2020

Hm, yeah that's a weird failure. I'm guessing it's related but not sure why. @holdenk @shaneknapp @HyukjinKwon do you know why that might happen?

AssertionError: Egg-link /home/jenkins/workspace/SparkPullRequestBuilder@2/python does not match installed location of pyspark (at /home/jenkins/workspace/SparkPullRequestBuilder@3/python)

@dongjoon-hyun
Copy link
Member

Give the following log, it seems to be related to virtualenv-side bug.

Constructing virtual env for testing
Using conda virtual environments
Testing pip installation with python 3.6
Using /tmp/tmp.2RCoqQqNP8 for virtualenv
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment /tmp/tmp.2RCoqQqNP8/3.6:
...

@HyukjinKwon
Copy link
Member

@srowen, I am investigating it in #29117. I will be able to fix soon I guess.

@HyukjinKwon HyukjinKwon changed the title [SPARK-29909][BUILD] Use python3 in build scripts [SPARK-29802][BUILD] Use python3 in build scripts Jul 19, 2020
@HyukjinKwon
Copy link
Member

Merged to master.

@HyukjinKwon
Copy link
Member

With the test results from Jenkins and GitHub Actions, seems all tests pass.

@srowen srowen deleted the SPARK-29909.2 branch August 16, 2020 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants