Skip to content

Conversation

@davisagli
Copy link
Member

Fixes #80

  • Support multiple styles of namespace packages. The template has to specify which one to use.
  • Go back to the pkg_resources style by default so that generating namespace packages with the cookieplone-template main branch isn't broken.

@davisagli davisagli requested a review from ericof March 25, 2025 04:39
@davisagli davisagli merged commit 7226a67 into main Mar 25, 2025
7 checks passed
@davisagli davisagli deleted the fix-namespace-regression branch March 25, 2025 04:40
@davisagli
Copy link
Member Author

@ericof I tried to make a release with this by running make release, but it gave me a warning about the manifest so I decided I should stop and check with you how to do it.

(main|…) % make release                                                                                                                                        ~/Plone/cookieplone
🚀 Release package
Using CPython 3.10.16
Creating virtual environment at: .venv
      Built cookieplone @ file:///Users/davisagli/Plone/cookieplone
      Built zestreleaser-towncrier==1.3.0
      Built zest-releaser==9.1.3
      Built zpretty==3.1.0
      Built cmarkgfm==2024.11.20
Installed 88 packages in 172ms
Do you want to run check-manifest? (Y/n)? 
lists of files in version control and sdist do not match!
missing from sdist:
  .pre-commit-config.yaml
  news/.changelog_template.jinja
  news/80.bugfix
  uv.lock
no MANIFEST.in found; you can run 'check-manifest -c' to create one
suggested MANIFEST.in rules:
  include *.lock
  include *.yaml
  recursive-include news *.bugfix
  recursive-include news *.jinja
MANIFEST.in has problems. Do you want to continue despite that? (y/N)? 

@stevepiercy
Copy link
Contributor

Are we not using zest.releaser to make releases? It's saved me from making mistakes several times, especially with MANIFEST.in.

@davisagli
Copy link
Member Author

@stevepiercy The make release command is using zest.releaser. It seems check-manifest is a bit overeager here because the files it says are missing are files that should not actually be in the sdist.

@davisagli
Copy link
Member Author

I don't think it makes sense to use check-manifest with a project that is using hatchling as its build-system, because hatchling uses configuration in pyproject.toml instead of MANIFEST.in

@davisagli
Copy link
Member Author

I skipped the check-manifest check and uploaded the 0.9.2 release

@stevepiercy
Copy link
Contributor

Makes sense. You can continue and ignore the manifest warning. AFAIK, zest.releaser doesn't check pyproject.toml

@stevepiercy
Copy link
Contributor

jinx!

@ericof
Copy link
Member

ericof commented Mar 25, 2025

I was coming here to say check-manifest does not know how to handle hatch configuration in pyproject.toml. I've tried to use the excludes for [tool.hatch.build.targets.sdist] but without any result.

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.

Regression: Generating namespace packages is broken

4 participants