Skip to main content

setuptools-lean

The setuptools-lean package provides a setuptools plugin for building and bundling Python extensions written in Lean. It uses Nerodia as its Lean backend.

Quick Start

Python modules are configured on the Lean side through Nerodia. For example, the Lean definition of the Python module mymodule would look something like this:

MyModule.lean

module
import Nerodia
open scoped Nerodia

py_module "mymodule"

This module can then be bundled into a Python package with the following configuration:

pyproject.toml

[project]
name = "mypackage"
version = "1.0.0"
requires-python = ">=3.14"

[tool.setuptools]
# setuptools-lean will generate a Python package for us.
# Without this field, setuptools may assume Lean libraries are Python packages.
# Python packages of your own can be added to this list.
packages = []

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

[[tool.setuptools-lean.ext-modules]]
lean-module = "MyModule"

This package can then be installed locally via pip install ., and the installed Python extension imported via import mymodule. If you are using uv, running Python code that imports mymodule is as simple as running uv run mymoduleuser.py in the same directory as the Python extension (no manual install necessary). setuptools-lean will also locate Nerodia-generated type stubs for the module where they need to be so that type checkers and editors will pick them up. Thus, editing a Python module mymoduleuser will provide all the rich type information and docstrings users might expect from regular Python code.

For a complete example of developing a Python package in Lean, refer to Nerodia.

Metadata

Release files for setuptools-lean 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for setuptools-lean 0.2.0
File Size Uploaded Provenance
setuptools_lean-0.2.0.tar.gz 16.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for setuptools-lean 0.2.0
File Interpreter ABI Platform
setuptools_lean-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.1 kB

Release files / setuptools_lean-0.2.0.tar.gz

Download URL setuptools_lean-0.2.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b7c1b54f2247f3c813727166312e5c9e22478bb2f25edc9267707dbe528fbbad
BLAKE2b-256 checksum
How to use checksums
de7e4860b343b5aadf1938672d264928ddf1ed4d975603817b83b2aed50c2d3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

Release files / setuptools_lean-0.2.0-py3-none-any.whl

Download URL setuptools_lean-0.2.0-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
982db60180d6aa9869bb77de9c37cdfa17617e2ad490bd8cdce1dfb2be316ae0
BLAKE2b-256 checksum
How to use checksums
86eccb7a2c4778ae65057f1bac18461d12a74a6178cbdbb6555b2bd3d10ee90d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

Security for setuptools-lean 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for setuptools_lean-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page