File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,21 @@ SPARK_ROOT_DIR="$(dirname $SCRIPT_DIR)"
22
22
PEP8_REPORT_PATH=" $SPARK_ROOT_DIR /dev/pep8-report.txt"
23
23
24
24
cd $SPARK_ROOT_DIR
25
+
26
+ # See: https://github.com/apache/spark/pull/1744#issuecomment-50982162
27
+ # Get pep8 at runtime so that we don't rely on it being installed on the build server.
28
+ # TODOs:
29
+ # - Dynamically determine latest release version of pep8 and use that.
30
+ # - Download this from a more reliable source. (GitHub raw can be flaky, apparently. (?))
31
+ PEP8_SCRIPT_PATH=" $SPARK_ROOT_DIR /dev/pep8.py"
32
+ curl --silent -o " $PEP8_SCRIPT_PATH " \
33
+ " https://raw.githubusercontent.com/jcrocholl/pep8/1.5.7/pep8.py"
34
+
25
35
# There is no need to write this output to a file
26
36
# + first, but we do so so that the check status can
27
37
# + be output before the report, like with the
28
38
# + scalastyle and RAT checks.
29
- pep8 ./python --exclude=" cloudpickle.py" \
39
+ python $PEP8_SCRIPT_PATH ./python --exclude=" cloudpickle.py" \
30
40
> " $PEP8_REPORT_PATH "
31
41
pep8_status=${PIPESTATUS[0]} # $?
32
42
@@ -39,4 +49,6 @@ if [ $pep8_status -ne 0 ]
39
49
fi
40
50
41
51
rm -f " $PEP8_REPORT_PATH "
52
+ rm " $PEP8_SCRIPT_PATH "
53
+
42
54
exit $pep8_status
You can’t perform that action at this time.
0 commit comments