Skip to content

Add setup.py / setup.cfg shim delegating sdist / bdist_wheel to maturin#1

Merged
serge-wq merged 2 commits intolyft-stable-1.26.0from
sergiof/temporal-sdk-public-build-shim
Apr 23, 2026
Merged

Add setup.py / setup.cfg shim delegating sdist / bdist_wheel to maturin#1
serge-wq merged 2 commits intolyft-stable-1.26.0from
sergiof/temporal-sdk-public-build-shim

Conversation

@serge-wq
Copy link
Copy Markdown

Summary

Adds a minimal setup.py / setup.cfg shim so python setup.py sdist and python setup.py bdist_wheel delegate to maturin, for build environments that still drive distributions through setuptools instead of python -m build. Canonical build metadata remains in pyproject.toml / [tool.maturin].

Details

  • setup.py: Custom sdist / bdist_wheel commands invoke maturin; if maturin is missing, the shim runs pip install maturin for the active interpreter (first-time installs may need network access).
  • Version: 1.26.0.post0 in pyproject.toml and setup.cfg; temporalio.__version__ remains 1.26.0 unless aligned in a follow-up.
  • Metadata: Project URLs updated to this fork’s GitHub location; documentation URL still points at the upstream project docs. Removed the License :: OSI Approved :: MIT License Trove classifier so setuptools ≥69 can merge pyproject.toml without a PEP 639 conflict (license remains MIT in [project]).
  • .gitignore: *.egg-info/ for local setup.py / egg_info runs.

How to verify

git submodule update --init --recursive
export PATH="$HOME/.cargo/bin:$PATH"   # or your Rust install
python setup.py sdist
python setup.py bdist_wheel

- Updated version in `pyproject.toml` to "1.26.0.post0".
- Changed repository URLs in `pyproject.toml` and `setup.cfg` to point to Lyft's GitHub.
- Added `setup.cfg` and `setup.py` for compatibility with legacy `setup.py` workflows, delegating build tasks to `maturin`.
- Updated `.gitignore` to include `*.egg-info/` directory.
Comment thread setup.py Outdated
Comment on lines +72 to +81
def _run_maturin(args: list[str]) -> None:
cmd = _maturin_cmd() + args
sys.stderr.write("Running: " + " ".join(cmd) + "\n")
subprocess.check_call(cmd, cwd=ROOT)


class sdist(_sdist):
def run(self) -> None:
self.mkpath(DIST_DIR)
_run_maturin(["sdist", "-o", DIST_DIR])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QQ, does anything in the build pipeline invoke setup.py sdist/bdist_wheel with --dist-dir?

The custom run() methods hardcode dist and ignore self.dist_dir, so the flag would be silently swallowed.

If yes, worth reading self.dist_dir instead:

dist_dir = getattr(self, "dist_dir", DIST_DIR)
self.mkpath(dist_dir)                                                                                                                                                                                                                                                      
_run_maturin(["sdist", "-o", dist_dir])

If nothing passes the flag, ignore this comment since default is "dist" and behavior is identical.

@serge-wq serge-wq merged commit bac65fa into lyft-stable-1.26.0 Apr 23, 2026
2 checks passed
@serge-wq serge-wq deleted the sergiof/temporal-sdk-public-build-shim branch April 23, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants