Skip to main content

Setuptools Gopy extension plugin

Project description

Setuptools plugin for Gopy extensions

setuptools-gopy is a plugin for setuptools to build Go Python extensions using gopy.

Usage

You can configure setuptools-gopy either through pyproject.toml or setup.py:

[build-system]
requires = ["setuptools", "setuptools-gopy"]
build-backend = "setuptools.build_meta"

[project]
name = "simple"
version = "0.0.1"

[tool.setuptools.packages]
find = { where = ["python"] }

[[tool.setuptools-gopy.ext-packages]]
target = "github.com/LouisBrunner/setuptools-gopy/examples/simple"
from setuptools import find_packages, setup

from setuptools_gopy import GopyExtension

setup(
    name="simple",
    version="0.0.1",
    packages=find_packages(where="python"),
    package_dir={"": "python"},
    gopy_extensions=[
        GopyExtension(
            "github.com/LouisBrunner/setuptools-gopy/examples/simple",
        )
    ],
)

In either case, you need to provide a target: this is the name of the Go package which should be built.

Once built, you can import Go symbols like so:

from .simple import Hello

Note that the name of the file will match the Go package that you imported.

Examples

Acknowledgements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

setuptools_gopy-0.0.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

setuptools_gopy-0.0.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file setuptools_gopy-0.0.1.tar.gz.

File metadata

  • Download URL: setuptools_gopy-0.0.1.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for setuptools_gopy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7b3d20c749c0d6c3db25ae7b2133d8ef5834e4132b8644aa7ab1525786082a7f
MD5 e10fe38be05a0f9c6eb1dfe919aa5b09
BLAKE2b-256 8f511b9b8ec1d1f90b0fa9d189a43a6b51fff82f1bb622e624313f6a9c9c2943

See more details on using hashes here.

Provenance

The following attestation bundles were made for setuptools_gopy-0.0.1.tar.gz:

Publisher: pypi.yaml on LouisBrunner/setuptools-gopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file setuptools_gopy-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for setuptools_gopy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a51a73a7c439728efde7dafd37e852de24de0c3ad2df0fd98dac0dac1c31ec65
MD5 5b3f0d755340a9d75af7d18e6f0bfd10
BLAKE2b-256 b2d7111d2316bb41e2c2149ecd4de22e00b1ac9cc6af0c60efdd1e650e5dd28d

See more details on using hashes here.

Provenance

The following attestation bundles were made for setuptools_gopy-0.0.1-py3-none-any.whl:

Publisher: pypi.yaml on LouisBrunner/setuptools-gopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page