io.github.cdklabs.projen.python.RequirementsFile Maven / Gradle / Ivy
Show all versions of projen Show documentation
package io.github.cdklabs.projen.python;
/**
* (experimental) Specifies a list of packages to be installed using pip.
*
* @see https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.105.0 (build 0a2adcb)", date = "2024-11-15T17:03:55.391Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.projen.$Module.class, fqn = "projen.python.RequirementsFile")
public class RequirementsFile extends io.github.cdklabs.projen.FileBase {
protected RequirementsFile(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected RequirementsFile(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param project This parameter is required.
* @param filePath This parameter is required.
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public RequirementsFile(final @org.jetbrains.annotations.NotNull io.github.cdklabs.projen.Project project, final @org.jetbrains.annotations.NotNull java.lang.String filePath, final @org.jetbrains.annotations.NotNull io.github.cdklabs.projen.python.RequirementsFileOptions options) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(project, "project is required"), java.util.Objects.requireNonNull(filePath, "filePath is required"), java.util.Objects.requireNonNull(options, "options is required") });
}
/**
* (experimental) Adds the specified packages provided in semver format.
*
* Comment lines (start with #
) are ignored.
*
* @param packages Package version in format <module>@<semver>
. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void addPackages(final @org.jetbrains.annotations.NotNull java.lang.String... packages) {
software.amazon.jsii.Kernel.call(this, "addPackages", software.amazon.jsii.NativeType.VOID, java.util.Arrays.