164b392ce45a1baa7523212c451fa3d20cb06450,setup.py,,main,#,64
Before Change
log("Installing Python dependencies")
reqFilePath = os.path.join(setupHome, "requirements.txt")
if os.path.isfile(reqFilePath):
reqItems = [line.strip() for line in open(reqFilePath)]
for r in reqItems:
log("Installing package: {0}".format(r))
subprocess.call([pipExePath, "install", "-U", "--upgrade", r])
After Change
pipExePath = os.path.join(os.path.dirname(sys.executable), r"Scripts\pip.exe")
setupHome = os.path.join(os.path.abspath(os.path.dirname(__file__)), "scripts")
distHome = os.path.join(os.path.abspath(os.path.dirname(__file__)) , "dist")
try:
arcpy = __import__("arcpy")
info = arcpy.GetInstallInfo()
if tuple(map(int, (info["Version"].split(".")))) < tuple(map(int, ("10.3.1".split(".")))):
raise Exception("No ArcGIS")
except:
die("Unable to find ArcGIS 10.3.1 or above. Cannot proceed.", 99)
try:
log("Installing PIP")
pipPyPath = os.path.join(setupHome, "get-pip.py")
locateFile(pipURL, pipPyPath)
subprocess.call([sys.executable, pipPyPath])
if os.path.isfile(pipExePath):
log("PIP installed successfully")
else:
raise Exception("PIP failed")
subprocess.call([pipExePath, "install", "--upgrade", "pip"])
subprocess.call([pipExePath, "install", "--upgrade", "wheel"])
except:
die("PIP installation failed!", 1)
try:
if sys.version_info[0] == 2:
log("Installing Microsoft Visual C++ Compiler")
vcSetupPath = os .path.join(distHome, "VCForPython27.msi")
locateFile(vcURL, vcSetupPath)
c = ["msiexec", "/i", vcSetupPath, "/qb-"]
log("Executing: {0}".format(" ".join(c)))
subprocess.call(c)
log("C++ Compiler for Python installed successfully")
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 6
Instances Project Name: Esri/raster-functions
Commit Name: 164b392ce45a1baa7523212c451fa3d20cb06450
Time: 2015-05-21
Author: akferoz@esri.com
File Name: setup.py
Class Name:
Method Name: main
Project Name: Esri/raster-functions
Commit Name: 164b392ce45a1baa7523212c451fa3d20cb06450
Time: 2015-05-21
Author: akferoz@esri.com
File Name: setup.py
Class Name:
Method Name: main
Project Name: tflearn/tflearn
Commit Name: 2399144826ce08e9052859539450fd779678d4de
Time: 2016-12-19
Author: aymeric.damien@gmail.com
File Name: tflearn/helpers/trainer.py
Class Name: Trainer
Method Name: save
Project Name: openml/openml-python
Commit Name: 3c680c10486e1a39789b5505a531c7ee4165607a
Time: 2021-02-12
Author: feurerm@informatik.uni-freiburg.de
File Name: tests/conftest.py
Class Name:
Method Name: read_file_list
Project Name: tflearn/tflearn
Commit Name: 2399144826ce08e9052859539450fd779678d4de
Time: 2016-12-19
Author: aymeric.damien@gmail.com
File Name: tflearn/helpers/trainer.py
Class Name: Trainer
Method Name: restore
Project Name: jakeret/tf_unet
Commit Name: dfb5016cefc3bad21ab900a1c8196c46d6bd2297
Time: 2017-12-29
Author: joel.akeret@gmail.com
File Name: setup.py
Class Name:
Method Name: