Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15659#discussion_r85538940
  
    --- Diff: python/setup.py ---
    @@ -0,0 +1,170 @@
    +#!/usr/bin/env python
    +
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +
    +from __future__ import print_function
    +import glob
    +import os
    +import sys
    +from setuptools import setup, find_packages
    +from shutil import copyfile, copytree, rmtree
    +
    +exec(open('pyspark/version.py').read())
    +VERSION = __version__
    +# A temporary path so we can access above the Python project root and 
fetch scripts and jars we need
    +TEMP_PATH = "deps"
    +SPARK_HOME = os.path.abspath("../")
    +JARS_PATH = "%s/assembly/target/scala-2.11/jars/" % SPARK_HOME
    +
    +# Use the release jars path if we are in release mode.
    +if (os.path.isfile("../RELEASE") and 
len(glob.glob("../jars/spark*core*.jar")) == 1):
    +    JARS_PATH = "%s/jars/" % SPARK_HOME
    +
    +EXAMPLES_PATH = "%s/examples/src/main/python" % SPARK_HOME
    +SCRIPTS_PATH = "%s/bin" % SPARK_HOME
    +SCRIPTS_TARGET = "%s/bin" % TEMP_PATH
    +JARS_TARGET = "%s/jars" % TEMP_PATH
    +EXAMPLES_TARGET = "%s/examples" % TEMP_PATH
    +
    +if sys.version_info < (2, 7):
    +        print("Python versions prior to 2.7 are not supported.", 
file=sys.stderr)
    +        exit(-1)
    +
    +# Check and see if we are under the spark path in which case we need to 
build the symlink farm.
    +# This is important because we only want to build the symlink farm while 
under Spark otherwise we
    +# want to use the symlink farm. And if the symlink farm exists under while 
under Spark (e.g. a
    +# partially built sdist) we should error and have the user sort it out.
    +in_spark = 
(os.path.isfile("../core/src/main/scala/org/apache/spark/SparkContext.scala") or
    --- End diff --
    
    So what is the difference between in_spark is true and false?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to