pex

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package pex implements construction of .pex files in Go. For performance reasons we've ultimately abandoned doing this in Python; we were ultimately not using pex for much at construction time and we already have most of what we need in Go via jarcat.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustAsset

func MustAsset(name string) []byte

MustAsset is a stubbed version of the function to help Go tooling.

Types

type Debugger

type Debugger string
const (
	Pdb     Debugger = "pdb"
	Debugpy Debugger = "debugpy"
)

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

A Writer implements writing a .pex file in various steps.

func NewWriter

func NewWriter(entryPoint, interpreter, options, stamp string, zipSafe, noSite bool) *Writer

NewWriter constructs a new Writer.

func (*Writer) SetDebugger

func (pw *Writer) SetDebugger(debugger Debugger)

func (*Writer) SetShebang added in v1.0.0

func (pw *Writer) SetShebang(shebang string, options string)

SetShebang sets the leading shebang that will be written to the file.

func (*Writer) SetTest

func (pw *Writer) SetTest(srcs []string, testRunner string, addTestRunnerDeps bool)

SetTest sets this Writer to write tests using the given sources. This overrides the entry point given earlier.

func (*Writer) Write

func (pw *Writer) Write(out, moduleDir string) error

Write writes the pex to the given output file.

Jump to

Keyboard shortcuts

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