oracle / graalpython

GraalPy – A high-performance embeddable Python 3 runtime for Java
https://www.graalvm.org/python/
Other
1.25k stars 111 forks source link

Adds a gradle plugin for graalpy #409

Closed Sowasvonbot closed 1 month ago

Sowasvonbot commented 4 months ago

The plugin requires the java-Plugin. If it is not loaded, the plugin will apply it.

It adds to task in the graalpy section:

graalpy {
  generateManifest
  installPackages
}

It may be configured in the the build.gradle with the following settings:

graalPy {
    packages = ["tqdm==4.66.4", "ujson"] // default: []
    includeVfsRootDir = true // default: true. If true, the venv and home will be put into: org.graalvm.python.vfs
    pythonHome {
        includes = ["someRegex"] // default: [".*"]
        excludes = ["someRegex"] // default: []
    }
    pythonResourcesDirectory = file "path/to/some/dir" // default: $buildDir/python-generated
   // if no value is provided for the directory, it will also be added to the classpath and added to the jar
}
oracle-contributor-agreement[bot] commented 4 months ago

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA). The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

timfel commented 4 months ago

@tomasstupka will review and integrate this :-)

fniephaus commented 1 month ago

Merged via https://github.com/oracle/graalpython/commit/bd0e25ed7ea3d012785760b82436cc3f41809541