Replies: 1 comment
-
It is mainly to support offline builds. We cannot assume an internet connection is available. We also have the issue of declaring their IP/license (see the Module.manifest files).
The main thing I am interested in exploring is using a pip download to replace what is happening in the
Because of the offline build requirement, we can't just look at the toml files because they don't show the transitive dependencies. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'd like to propose transitioning the Python dependency management approach from the current
distributePyDeppattern in Gradle build files to leveraging the standardpyproject.tomldependenciesspecification, combined with apip downloadworkflow for offline distribution.Current Situation
Currently, Python dependencies are managed in two separate places:
1. Gradle
build.gradlefilesFor example, in
Ghidra/Features/PyGhidra/build.gradle, dependencies are declared usingdistributePyDep:2.
pyproject.tomlfilesThe same dependencies are already properly declared in
Ghidra/Features/PyGhidra/src/main/py/pyproject.toml:The Problem
This dual-management approach creates confusion, especially for contributors who are familiar with Python but not Java/Gradle:
Discoverability: When reading
Debugger-agent-dbgeng/src/main/py/pyproject.toml, one would assume onlyghidratraceandpybagare dependencies. The additional dependencies inbuild.gradle(capstone,comtypes,pywin32) are hidden from Python developers.Barrier to contribution: Python-focused contributors may struggle to understand or modify dependencies without Gradle knowledge.
Maintenance overhead: Dependencies need to be updated in multiple places.
Proposed Solution
Replace
distributePyDepcalls with a standard Python workflow:This could be integrated into the Gradle build process, reading dependencies directly from
pyproject.tomlrather than duplicating them in Gradle files.Benefits
pyproject.tomlQuestions
distributePyDepapproach that I might be missing? (e.g., offline builds, specific version pinning for wheels)Context
I'm primarily a Python developer looking to contribute to Ghidra's Python components. The current setup creates a barrier for understanding the full dependency picture without diving into Gradle files, which may discourage Python-focused contributors.
Thank you for considering this proposal!
Beta Was this translation helpful? Give feedback.
All reactions