Documentation ¶
Index ¶
- func ExtractPackageNameFromSetupPy(setuppyFilePath string) (string, 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, log utils.Log, srcPath string) (map[string]entities.Dependency, error)
- func InstallWithLogParsing(tool PythonTool, commandArgs []string, log utils.Log, srcPath string) (map[string]entities.Dependency, error)
- func UpdateDepsIdsAndRequestedBy(dependenciesMap map[string]entities.Dependency, ...)
- type PoetryLock
- type PoetryPackage
- type PyprojectToml
- type PythonTool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractPackageNameFromSetupPy ¶
Get the project-name by running 'egg_info' command on setup.py and extracting it from 'PKG-INFO' file.
func GetPackageName ¶
func GetPackageName(tool PythonTool, srcPath string) (packageName string, err error)
func GetPython3Executable ¶
func GetPythonDependencies ¶
func GetPythonDependenciesFiles ¶
func GetPythonDependenciesFiles(tool PythonTool, args []string, log utils.Log, srcPath string) (map[string]entities.Dependency, error)
func InstallWithLogParsing ¶
func InstallWithLogParsing(tool PythonTool, commandArgs []string, log utils.Log, srcPath string) (map[string]entities.Dependency, error)
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 ¶
type PoetryLock struct {
Package []*PoetryPackage
}
type PoetryPackage ¶
type PyprojectToml ¶
type PyprojectToml struct {
Tool map[string]PoetryPackage
}
type PythonTool ¶
type PythonTool string
const ( Pip PythonTool = "pip" Pipenv PythonTool = "pipenv" Poetry PythonTool = "poetry" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.