Skip to content

Commit 6db9d8a

Browse files
committed
enhanced javadoc in VirtualFileSystem.Builder.resourceDirectory
1 parent 4a48717 commit 6db9d8a

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding/GraalPyResources.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,13 @@ public static Context.Builder contextBuilder(VirtualFileSystem vfs) {
354354
* <code>/python/venv</code> (python virtual environment)</li>
355355
* </ul>
356356
* </p>
357-
*
357+
*
358+
* <p/>
359+
* When Maven or Gradle GraalPy plugin is used to build the virtual environment, it also has to
360+
* be configured to generate the virtual environment into the same directory using the
361+
* {@code <externalDirectory>} tag in Maven or the {@code externalDirectory} field in Gradle.
362+
* <p/>
363+
*
358364
* @param externalResourcesDirectory the root directory with GraalPy specific embedding
359365
* resources
360366
* @return a new {@link org.graalvm.polyglot.Context.Builder} instance

graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding/VirtualFileSystem.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,17 @@ private Builder() {
119119
* <p/>
120120
* User scripts, data files, and other resources that should be accessible in Python should
121121
* be put into this resource directory, e.g.,
122-
* {@code src/main/resources/org.graalvm.python.vfs} for the default value of this option
123-
* and assuming the usual layout of a Maven or Gradle project.
122+
* {@code src/main/resources/org.graalvm.python.vfs/src} where:
123+
* <ul>
124+
* <li>assuming the usual layout of a Maven or Gradle project then the
125+
* {@code src/main/resources/org.graalvm.python.vfs} prefix is the default value of the
126+
* {@code resourceDirectory} option</li>
127+
* <li>and the following {@code src} directory is the folder used by {@link GraalPyResources
128+
* convention} for Python application files and is configured as the default search path for
129+
* Python module files.</i>
130+
* </ul>
124131
* <p/>
125-
* When Maven and Gradle GraalPy plugin is used to build the virtual environment, it should
132+
* When Maven or Gradle GraalPy plugin is used to build the virtual environment, it should
126133
* be configured to generate the virtual environment into the same directory using the
127134
* {@code <resourceDirectory>} tag in Maven or the {@code resourceDirectory} field in
128135
* Gradle.

0 commit comments

Comments
 (0)