Skip to content

docs: correct what the build tools page says about setuptools defaults - #835

Open
simonvanlierde wants to merge 1 commit into
pyOpenSci:mainfrom
simonvanlierde:setuptools-defaults
Open

simonvanlierde wants to merge 1 commit into
pyOpenSci:mainfrom
simonvanlierde:setuptools-defaults

Conversation

@simonvanlierde

Copy link
Copy Markdown
Contributor

Hi!

This fixes #67. The "Challenges using setuptools" bullets say setuptools builds without a name or version unless the metadata is in pyproject.toml, and puts every file in the repo into the sdist unless MANIFEST.in excludes it. Neither holds today, so I rewrote them along the lines of @abravalheri's answer in the issue.

  • Name and version: with a [project] table, setuptools stops with an error when either is missing. Only a project with no metadata at all still builds, as <package>-0.0.0.
  • Files: on its own, setuptools adds a short default list, without docs/ or .github/. setuptools-scm is what adds every tracked file, which is likely what @lwasser saw. The bullet now says so, and how to check an sdist with tar tzf.

Tests: nox -s docs-test passes, and so do the translated builds. I checked each claim by building small projects in a container with setuptools 84.2.1 and setuptools-scm 10.3.4.

Best,

Simon

- setuptools errors when [project] lacks a name or version; only a
  project with no metadata at all builds as <package>-0.0.0
- the sdist holds a short default file list; setuptools-scm is what
  adds every tracked file, so say that and how to check an sdist

Fixes pyOpenSci#67
@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for python-package-guide ready!

Name Link
🔨 Latest commit 941d9e4
🔍 Latest deploy log https://app.netlify.com/projects/python-package-guide/deploys/6adbac7903af631759281292
😎 Deploy Preview https://deploy-preview-835--python-package-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@willingc

Copy link
Copy Markdown
Collaborator

Hi @simonvanlierde, Thank you for all of the PRs. I will try to get through them early next week.

@shaunagm @lwasser It may make sense to do a virtual hour sprint online in the upcoming weeks to focus on updates to the guide (especially in light of the security fun of this week). Shauna, it might be fun to do an OpenHatch style before and after impact blog post of the update. I've been thinking about how to empower virtual sprints and collect some evidence re: onboarding, impact, etc. We can start simple. Maybe using the community call slot as a recurring triage/contribution sprint (when it isn't being used for the community call).

This branch has not been deployed

No deployments
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.

Imprecise information on the Challenges using setuptools section.

2 participants