oracle / graalpython

A Python 3 implementation built on GraalVM
Other
1.2k stars 104 forks source link

Adds a gradle plugin for graalpy #409

Open Sowasvonbot opened 2 months ago

Sowasvonbot commented 2 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 2 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 2 months ago

@tomasstupka will review and integrate this :-)