Package io.github.cdklabs.projen.python
Class RequirementsFile
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- io.github.cdklabs.projen.Component
-
- io.github.cdklabs.projen.FileBase
-
- io.github.cdklabs.projen.python.RequirementsFile
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.245Z") @Stability(Experimental) public class RequirementsFile extends FileBase
(experimental) Specifies a list of packages to be installed using pip.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRequirementsFile.Builder(experimental) A fluent builder forRequirementsFile.
-
Constructor Summary
Constructors Modifier Constructor Description RequirementsFile(Project project, String filePath, RequirementsFileOptions options)protectedRequirementsFile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedRequirementsFile(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPackages(@NotNull String... packages)(experimental) Adds the specified packages provided in semver format.protected StringsynthesizeContent(IResolver resolver)(experimental) Implemented by derived classes and returns the contents of the file to emit.-
Methods inherited from class io.github.cdklabs.projen.FileBase
getAbsolutePath, getChanged, getExecutable, getMarker, getPath, getReadonly, setExecutable, setReadonly, synthesize
-
Methods inherited from class io.github.cdklabs.projen.Component
getProject, isComponent, postSynthesize, preSynthesize
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
RequirementsFile
protected RequirementsFile(software.amazon.jsii.JsiiObjectRef objRef)
-
RequirementsFile
protected RequirementsFile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
RequirementsFile
@Stability(Experimental) public RequirementsFile(@NotNull Project project, @NotNull String filePath, @NotNull RequirementsFileOptions options)- Parameters:
project- This parameter is required.filePath- This parameter is required.options- This parameter is required.
-
-
Method Detail
-
addPackages
@Stability(Experimental) public void addPackages(@NotNull @NotNull String... packages)(experimental) Adds the specified packages provided in semver format.Comment lines (start with
#) are ignored.- Parameters:
packages- Package version in format<module>@<semver>. This parameter is required.
-
synthesizeContent
@Stability(Experimental) @Nullable protected String synthesizeContent(@NotNull IResolver resolver)
(experimental) Implemented by derived classes and returns the contents of the file to emit.- Specified by:
synthesizeContentin classFileBase- Parameters:
resolver- This parameter is required.- Returns:
- the content to synthesize or undefined to skip the file
-
-