build

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package build holds the static version, platform, compiler, and copyright strings reported by the gopy runtime. Mirrors CPython's getversion.c, getplatform.c, getcompiler.c, and getcopyright.c.

Index

Constants

View Source
const Copyright = "Copyright (c) 2026 The gopy Authors. All Rights Reserved.\n" +
	"\n" +
	"Portions of the design and behavior are derived from CPython,\n" +
	"Copyright (c) 2001-2026 Python Software Foundation. All Rights Reserved.\n" +
	"\n" +
	"This program is licensed under the Apache License, Version 2.0.\n"

Copyright is the static copyright string surfaced by the runtime, matching the form used by CPython's Py_GetCopyright.

CPython: Python/getcopyright.c:20 Py_GetCopyright

View Source
const PythonCompatVersion = "3.14.0+"

PythonCompatVersion is the upstream CPython version this port tracks.

View Source
const PythonMajorVersion = 3

PythonMajorVersion is the major component of the CPython version gopy tracks. Mirrors Include/patchlevel.h:20 PY_MAJOR_VERSION.

View Source
const PythonMinorVersion = 14

PythonMinorVersion is the minor component of the CPython version gopy tracks. Mirrors Include/patchlevel.h:21 PY_MINOR_VERSION.

View Source
const Version = "0.12.1"

Version is the gopy release version. Bumped per release tag.

Variables

This section is empty.

Functions

func Compiler

func Compiler() string

Compiler returns the Go toolchain identifier that built the running binary (e.g. "go1.26"). Mirrors CPython's Py_GetCompiler, which returns a string like "[GCC 13.2.0]".

CPython: Python/getcompiler.c:24 Py_GetCompiler

func Platform

func Platform() string

Platform returns the platform string in the form "GOOS/GOARCH" (e.g. "darwin/arm64", "linux/amd64"). Mirrors CPython's Py_GetPlatform.

CPython: Python/getplatform.c:9 Py_GetPlatform

func VersionString

func VersionString() string

VersionString returns the full version banner.

gopy 0.1.0 (3.14.0+) [go1.26 darwin/arm64]

CPython: Python/getversion.c:27 Py_GetVersion

Types

This section is empty.

Jump to

Keyboard shortcuts

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