Documentation ¶
Index ¶
- func CreateArtifactsFromPaths(artifactsPaths []string) (artifacts []entities.Artifact, err error)
- func GetPackageName(tool PythonTool, srcPath string) (packageName string, err error)
- func GetPython3Executable() (string, string)
- func GetPythonDependencies(tool PythonTool, srcPath, localDependenciesPath string) (dependenciesGraph map[string][]string, topLevelDependencies []string, ...)
- func GetPythonDependenciesFiles(tool PythonTool, args []string, buildName, buildNumber string, log utils.Log, ...) (map[string]entities.Dependency, error)
- func InstallWithLogParsing(tool PythonTool, commandArgs []string, log utils.Log, srcPath string) (map[string]entities.Dependency, error)
- func TwineUploadWithLogParsing(commandArgs []string, srcPath string) (artifactsPaths []string, err error)
- func UpdateDepsIdsAndRequestedBy(dependenciesMap map[string]entities.Dependency, ...)
- type PoetryLock
- type PoetryPackage
- type Project
- type PyProjectToml
- type PythonTool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateArtifactsFromPaths ¶ added in v1.10.0
Create artifacts entities from the artifacts paths that were found during the upload.
func GetPackageName ¶ added in v1.6.0
func GetPackageName(tool PythonTool, srcPath string) (packageName string, err error)
func GetPython3Executable ¶ added in v1.8.1
func GetPythonDependencies ¶
func GetPythonDependenciesFiles ¶ added in v1.7.0
func GetPythonDependenciesFiles(tool PythonTool, args []string, buildName, buildNumber string, log utils.Log, srcPath string) (map[string]entities.Dependency, error)
func InstallWithLogParsing ¶ added in v1.7.0
func InstallWithLogParsing(tool PythonTool, commandArgs []string, log utils.Log, srcPath string) (map[string]entities.Dependency, error)
func TwineUploadWithLogParsing ¶ added in v1.10.0
func TwineUploadWithLogParsing(commandArgs []string, srcPath string) (artifactsPaths []string, err error)
Run a twine upload and parse artifacts paths from logs.
func UpdateDepsIdsAndRequestedBy ¶
func UpdateDepsIdsAndRequestedBy(dependenciesMap map[string]entities.Dependency, dependenciesGraph map[string][]string, topLevelPackagesList []string, packageName, moduleName string)
Before running this function, dependency IDs may be the file names of the resolved python packages. Update build info dependency IDs and the requestedBy field. allDependencies - Dependency name to Dependency map dependenciesGraph - Dependency graph as built by 'pipdeptree' or 'pipenv graph' topLevelPackagesList - The direct dependencies packageName - The resolved package name of the Python project, may be empty if we couldn't resolve it moduleName - The input module name from the user, or the packageName
Types ¶
type PoetryLock ¶ added in v1.6.0
type PoetryLock struct {
Package []*PoetryPackage
}
type PoetryPackage ¶ added in v1.6.0
type Project ¶ added in v1.10.0
Pypi project defined for package managers other than poetry (pip, pipenv, etc...)
type PyProjectToml ¶ added in v1.10.0
type PyProjectToml struct { // Represents the [tool.poetry] section in pyproject.toml. Tool map[string]PoetryPackage // Represents the [project] section in pyproject.toml, for pypi package managers other than poetry. Project Project }
type PythonTool ¶
type PythonTool string
const ( Pip PythonTool = "pip" Pipenv PythonTool = "pipenv" Poetry PythonTool = "poetry" Twine PythonTool = "twine" )