io.github.cdklabs.projen.python.SetupPy Maven / Gradle / Ivy
Show all versions of projen Show documentation
package io.github.cdklabs.projen.python;
/**
* (experimental) Python packaging script where package metadata can be placed.
*/
@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.SetupPy")
public class SetupPy extends io.github.cdklabs.projen.FileBase {
protected SetupPy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected SetupPy(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param project This parameter is required.
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public SetupPy(final @org.jetbrains.annotations.NotNull io.github.cdklabs.projen.Project project, final @org.jetbrains.annotations.NotNull io.github.cdklabs.projen.python.SetupPyOptions 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(options, "options is required") });
}
/**
* (experimental) Implemented by derived classes and returns the contents of the file to emit.
*
* @param resolver This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
protected @org.jetbrains.annotations.Nullable java.lang.String synthesizeContent(final @org.jetbrains.annotations.NotNull io.github.cdklabs.projen.IResolver resolver) {
return software.amazon.jsii.Kernel.call(this, "synthesizeContent", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(resolver, "resolver is required") });
}
/**
* (experimental) A fluent builder for {@link io.github.cdklabs.projen.python.SetupPy}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param project This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final io.github.cdklabs.projen.Project project) {
return new Builder(project);
}
private final io.github.cdklabs.projen.Project project;
private final io.github.cdklabs.projen.python.SetupPyOptions.Builder options;
private Builder(final io.github.cdklabs.projen.Project project) {
this.project = project;
this.options = new io.github.cdklabs.projen.python.SetupPyOptions.Builder();
}
/**
* (experimental) Escape hatch to allow any value.
*
* @return {@code this}
* @param additionalOptions Escape hatch to allow any value. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder additionalOptions(final java.util.Map additionalOptions) {
this.options.additionalOptions(additionalOptions);
return this;
}
/**
* (experimental) Author's e-mail.
*
* @return {@code this}
* @param authorEmail Author's e-mail. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder authorEmail(final java.lang.String authorEmail) {
this.options.authorEmail(authorEmail);
return this;
}
/**
* (experimental) Author's name.
*
* @return {@code this}
* @param authorName Author's name. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder authorName(final java.lang.String authorName) {
this.options.authorName(authorName);
return this;
}
/**
* (experimental) A list of PyPI trove classifiers that describe the project.
*
* @return {@code this}
* @see https://pypi.org/classifiers/
* @param classifiers A list of PyPI trove classifiers that describe the project. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder classifiers(final java.util.List classifiers) {
this.options.classifiers(classifiers);
return this;
}
/**
* (experimental) A short project description.
*
* @return {@code this}
* @param description A short project description. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder description(final java.lang.String description) {
this.options.description(description);
return this;
}
/**
* (experimental) Package's Homepage / Website.
*
* @return {@code this}
* @param homepage Package's Homepage / Website. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder homepage(final java.lang.String homepage) {
this.options.homepage(homepage);
return this;
}
/**
* (experimental) The project license.
*
* @return {@code this}
* @param license The project license. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder license(final java.lang.String license) {
this.options.license(license);
return this;
}
/**
* (experimental) Name of the package.
*
* @return {@code this}
* @param name Name of the package. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder name(final java.lang.String name) {
this.options.name(name);
return this;
}
/**
* (experimental) List of submodules to be packaged.
*
* @return {@code this}
* @param packages List of submodules to be packaged. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder packages(final java.util.List packages) {
this.options.packages(packages);
return this;
}
/**
* (experimental) Manually specify package version.
*
* @return {@code this}
* @param version Manually specify package version. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder version(final java.lang.String version) {
this.options.version(version);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.projen.python.SetupPy}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public io.github.cdklabs.projen.python.SetupPy build() {
return new io.github.cdklabs.projen.python.SetupPy(
this.project,
this.options.build()
);
}
}
}