mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-21 11:31:43 +00:00
GP-4816: Not trying to create python virtual environment during prepdev
is python is not installed
This commit is contained in:
parent
b58a0c90b2
commit
c378cc40a2
@ -65,7 +65,10 @@ task installEditablePyGhidra(type: Exec) {
|
||||
|
||||
commandLine "$PYTHON3_VENV", "-m", "pip", "install", "-e", "src/main/py"
|
||||
}
|
||||
rootProject.prepDev.dependsOn installEditablePyGhidra
|
||||
|
||||
if (findPython3(false)) {
|
||||
rootProject.prepDev.dependsOn installEditablePyGhidra
|
||||
}
|
||||
|
||||
// Add pyghidra_launcher.py to the release
|
||||
rootProject.assembleDistribution {
|
||||
|
@ -50,7 +50,7 @@ if ("32".equals(System.getProperty("sun.arch.data.model"))) {
|
||||
* Identify supported Python command
|
||||
***************************************************************************************/
|
||||
project.ext.SUPPORTED_PY_VERSIONS = ['3.12', '3.11', '3.10', '3.9']
|
||||
project.ext.PYTHON3 = findPython3()
|
||||
project.ext.PYTHON3 = findPython3(true)
|
||||
project.ext.PYTHON_DEPS = new HashSet<String>()
|
||||
|
||||
/*********************************************************************************
|
||||
@ -198,7 +198,7 @@ def checkPip(String pyCmd) {
|
||||
}
|
||||
}
|
||||
|
||||
def findPython3() {
|
||||
def findPython3(boolean useDefault) {
|
||||
for (pyCmd in ['py', 'python3', 'python']) {
|
||||
def pyVer = checkPythonVersion(pyCmd)
|
||||
if (pyVer in SUPPORTED_PY_VERSIONS) {
|
||||
@ -219,7 +219,8 @@ def findPython3() {
|
||||
// Force use of non-existent python3.9 instead of unsupported python version
|
||||
// which should fail if a python build is performed.
|
||||
println("Warning: Python3 command not found (required for build)")
|
||||
return 'python3.9'
|
||||
|
||||
return useDefault ? 'python3.9' : null
|
||||
}
|
||||
|
||||
/******************************************************************************************
|
||||
|
@ -28,4 +28,6 @@ task createPythonVirtualEnvironment(type: Exec) {
|
||||
commandLine rootProject.PYTHON3, "-m", "venv", venvDir, "--copies"
|
||||
}
|
||||
|
||||
rootProject.prepDev.dependsOn createPythonVirtualEnvironment
|
||||
if (findPython3(false)) {
|
||||
rootProject.prepDev.dependsOn createPythonVirtualEnvironment
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user