pyproject

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(content string, sourceFile string) ([]models.Dependency, error)

Types

type BuildSystem added in v0.1.0

type BuildSystem struct {
	Requires []string `toml:"requires"`
}

BuildSystem is the PEP 518 [build-system] table; Requires lists the packages needed to build the project (setuptools, cmake, …) — build-time, not runtime.

type Flit

type Flit struct {
	Metadata *FlitMetadata `toml:"metadata"`
}

type FlitMetadata

type FlitMetadata struct {
	Module   string `toml:"module"`
	DistName string `toml:"dist-name"`
}

type NameResult

type NameResult struct {
	Name          *string
	IsDynamic     bool
	DynamicReason string
}

func ParseName

func ParseName(content string) NameResult

func (NameResult) GetDynamicReason

func (nr NameResult) GetDynamicReason() string

func (NameResult) GetIsDynamic

func (nr NameResult) GetIsDynamic() bool

func (NameResult) GetName

func (nr NameResult) GetName() *string

type Poetry

type Poetry struct {
	Dependencies    map[string]any `toml:"dependencies"`
	DevDependencies map[string]any `toml:"dev-dependencies"`
}

type Project

type Project struct {
	Name                 string              `toml:"name"`
	Dynamic              []string            `toml:"dynamic"`
	Dependencies         []string            `toml:"dependencies"`
	OptionalDependencies map[string][]string `toml:"optional-dependencies"`
}

type PyProjectToml

type PyProjectToml struct {
	Project          *Project         `toml:"project"`
	Tool             *Tool            `toml:"tool"`
	BuildSystem      *BuildSystem     `toml:"build-system"`
	DependencyGroups map[string][]any `toml:"dependency-groups"`
}

type Tool

type Tool struct {
	Poetry *Poetry `toml:"poetry"`
	Flit   *Flit   `toml:"flit"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL