platforms

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package platforms defines the GOOS/GOARCH targets gowheels supports and their corresponding Python wheel platform tags.

Index

Constants

This section is empty.

Variables

View Source
var All = []Platform{
	{
		GOOS:       "linux",
		GOARCH:     "amd64",
		WheelTags:  []string{"manylinux_2_17_x86_64.manylinux2014_x86_64", "musllinux_1_2_x86_64"},
		ArchiveExt: "tar.gz",
	},
	{
		GOOS:   "linux",
		GOARCH: "arm64",
		WheelTags: []string{
			"manylinux_2_17_aarch64.manylinux2014_aarch64",
			"musllinux_1_2_aarch64",
		},
		ArchiveExt: "tar.gz",
	},
	{
		GOOS:       "darwin",
		GOARCH:     "amd64",
		WheelTags:  []string{"macosx_10_9_x86_64"},
		ArchiveExt: "tar.gz",
	},
	{
		GOOS:       "darwin",
		GOARCH:     "arm64",
		WheelTags:  []string{"macosx_11_0_arm64"},
		ArchiveExt: "tar.gz",
	},
	{
		GOOS:       "windows",
		GOARCH:     "amd64",
		WheelTags:  []string{"win_amd64"},
		ArchiveExt: "zip",
	},
	{
		GOOS:       "windows",
		GOARCH:     "arm64",
		WheelTags:  []string{"win_arm64"},
		ArchiveExt: "zip",
	},
}

All lists every platform gowheels supports. Linux targets produce two wheel tags (manylinux glibc + musllinux) from a single static binary.

Functions

This section is empty.

Types

type Platform

type Platform struct {
	GOOS       string
	GOARCH     string
	WheelTags  []string // one or more PEP 425 platform tags
	ArchiveExt string   // archive extension used by GoReleaser ("tar.gz" or "zip")
}

Platform describes a single GOOS/GOARCH target and the Python wheel tags it maps to. A single compiled binary covers all WheelTags for its os/arch pair (valid when CGO_ENABLED=0 produces a fully static binary).

func Filter

func Filter(filter string) ([]Platform, error)

Filter returns platforms matching the comma-separated os/arch filter string. An empty filter returns all platforms.

func Lookup

func Lookup(goos, goarch string) (Platform, error)

Lookup returns the Platform for the given GOOS/GOARCH pair, or an error if it is not in the supported set.

func (Platform) BinaryExt

func (p Platform) BinaryExt() string

BinaryExt returns ".exe" on Windows, "" otherwise.

func (Platform) GoReleaserArch

func (p Platform) GoReleaserArch() string

GoReleaserArch returns the arch string used in GoReleaser archive names.

func (Platform) GoReleaserOS

func (p Platform) GoReleaserOS() string

GoReleaserOS returns the title-cased OS name used in GoReleaser archive names.

func (Platform) Windows

func (p Platform) Windows() bool

Windows reports whether this is a Windows target.

Jump to

Keyboard shortcuts

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