Documentation
¶
Index ¶
- Constants
- func DecodePreReleasePhase(ver string) int
- func DecodeSpecifier(specifier string) (s pySpecifier, err error)
- func EqualReleaseNumber(a, b []int) bool
- func EqualVersion(a, b *Version) bool
- func Fabricate(pkgPath string, name string, version string, environment string, dstDir string) (prefabPath string, blueprintPath string, err error)
- func LengthWithoutTailingZeros(a []int) int
- func NewerEqualReleaseNumber(a, b []int) bool
- func NewerReleaseNumber(a, b []int) bool
- func NewerVersion(a, b *Version) bool
- func NormalizeName(name string) string
- func ParseRelease(ver string) []int
- func PrefixMatchVersion(a, b *Version) bool
- func WildcardMatchReleaseNumber(a, b []int) bool
- type Package
- type PyPIQuery
- type Repo
- func (r *Repo) Fabricate(specSheet repointerface.SpecSheet, dstDir string) (prefabPath string, blueprintPath string, err error)
- func (r *Repo) FabricateDepend(item *prefab.Prefab, existVersions []string, dstDir string) (prefabPaths []string, blueprintPaths []string, err error)
- func (r *Repo) GenerateSpecSheet(name string, specifier string) (specSheet repointerface.SpecSheet, err error)
- func (r *Repo) GetEnvs(specSheet repointerface.SpecSheet) (envs []string, err error)
- func (r *Repo) GetVersions(specSheet repointerface.SpecSheet) (versions []string, err error)
- func (r *Repo) Init(ctx *dcontext.DeployContext) (err error)
- type SpecSheet
- func (s *SpecSheet) Environment() string
- func (s *SpecSheet) Name() string
- func (s *SpecSheet) SelectEnv(envs []string) (err error)
- func (s *SpecSheet) SelectVersion(versions []string) (err error)
- func (s *SpecSheet) Type() string
- func (s *SpecSheet) Version() string
- func (s *SpecSheet) VersionSpecifier() string
- type Version
Constants ¶
const SOURCE_DISTRIBUTION_ENV_TAG = "sdist"
const TORCH_BASE_URL = "https://download.pytorch.org/"
Variables ¶
This section is empty.
Functions ¶
func DecodePreReleasePhase ¶
2 for a, 3 for b, 4 for rc, 1 for not pre-release
func DecodeSpecifier ¶
operator, version, isWildcard
func EqualReleaseNumber ¶
Return True if two release numbers are equal
func EqualVersion ¶
Return True if Version a and b are equal aka b satisfies == a If the "a" is a public version identifier (no local version label), then the local version label of "b" MUST be ignored when matching versions.
func NewerEqualReleaseNumber ¶
Return True if a is newer than or equal to b
func NormalizeName ¶
func ParseRelease ¶
func PrefixMatchVersion ¶
Return True is b prefix match to a
func WildcardMatchReleaseNumber ¶
Return True if b matches wildcard a e.g. if a = 1.1.2, then its wildcard version is 1.1.* , when b = 1.1.3.4, return true, since 1.1.* == 1.1.3.4
Types ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) FabricateDepend ¶
func (*Repo) GenerateSpecSheet ¶
func (*Repo) GetEnvs ¶
func (r *Repo) GetEnvs(specSheet repointerface.SpecSheet) (envs []string, err error)
func (*Repo) GetVersions ¶
func (r *Repo) GetVersions(specSheet repointerface.SpecSheet) (versions []string, err error)
type SpecSheet ¶
type SpecSheet struct {
SpecType string `json:"specType"`
Name_s string `json:"name"`
Version_s string `json:"version"`
Environment_s string `json:"environment"`
Specifier string `json:"specifier"`
PyVer string `json:"pyVer"` // e.g. "3.10"
LibcVer string `json:"libcVer"` // e.g. "2.36"
Arch string `json:"arch"` // e.g. "amd64"
}
func (*SpecSheet) Environment ¶
func (*SpecSheet) SelectEnv ¶
select one environment and fill it into [environmet] Warning! no matched environment is not an error, should leave [environment] empty and return nil
func (*SpecSheet) SelectVersion ¶
1. set [environmet] to "" 2. select one version and fill it into [version] Warning! no matched version is not an error, should leave [version] empty and return nil
func (*SpecSheet) VersionSpecifier ¶
type Version ¶
type Version struct {
Epoch int // Original Epoch segment
Release string // Original Release String
Rel_n []int // Release Number
Pre string // Original Pre-release segment
Pre_l int // 2 for a, 3 for b, 4 for rc, 1 for not pre-release
Pre_n int // Pre-Release Number
Post string // Original Post-Release segment
Post_n int // Post-Release Number
Dev string // Original Dev-Release segment
Dev_n int // Dev-Release Number
Local string // Original Local version identifiers
IsPre bool
IsPost bool
IsDev bool
IsLocal bool
}