1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-09-16 09:26:22 +02:00

remove feature flag

This commit is contained in:
Christopher Fenner
2025-09-12 09:52:09 +02:00
parent a88c5da7b3
commit ca19ce61b7

View File

@@ -7,7 +7,6 @@ import (
"github.com/SAP/jenkins-library/pkg/buildsettings"
"github.com/SAP/jenkins-library/pkg/command"
"github.com/SAP/jenkins-library/pkg/feature"
"github.com/SAP/jenkins-library/pkg/log"
"github.com/SAP/jenkins-library/pkg/piperutils"
"github.com/SAP/jenkins-library/pkg/python"
@@ -64,23 +63,22 @@ func runPythonBuild(config *pythonBuildOptions, telemetryData *telemetry.CustomD
}
//TODO: use a defer func to cleanup the virtual environment
// FEATURE FLAG (com_sap_piper_featureFlag_pythonToml) to switch to new implementation of python build step
if feature.IsFeatureEnabled("pythonToml") {
// check project descriptor
buildDescriptorFilePath, err := searchDescriptor([]string{"pyproject.toml", "setup.py"}, utils.FileExists)
if err != nil {
return err
}
// build package
if strings.HasSuffix(buildDescriptorFilePath, "pyproject.toml") {
// TOML file
if err := python.InstallProjectDependencies(utils.RunExecutable, python.Binary); err != nil {
return fmt.Errorf("Failed to install project dependencies: %w", err)
}
if err := python.Build(utils.RunExecutable, python.Binary, config.BuildFlags, config.SetupFlags); err != nil {
return fmt.Errorf("Failed to build python project: %w", err)
}
}
} else {
// legacy handling setup.py
if err := buildExecute(config, utils, virutalEnvironmentPathMap); err != nil {
return fmt.Errorf("Python build failed with error: %w", err)
}