Skip to content

Add script to convert package to PEP 420 namespace.#303

Merged
icemac merged 4 commits intomasterfrom
re-194/PEP-420
Feb 12, 2025
Merged

Add script to convert package to PEP 420 namespace.#303
icemac merged 4 commits intomasterfrom
re-194/PEP-420

Conversation

@icemac
Copy link
Member

@icemac icemac commented Feb 11, 2025

@icemac
Copy link
Member Author

icemac commented Feb 11, 2025

I simplified the implementation a bit more because @mauritsvanrees pointed me to an easier way which even sould prevent a warning during the release if there are directories which do not contain any Python code.

@icemac icemac merged commit 16b2f13 into master Feb 12, 2025
12 checks passed
@icemac icemac deleted the re-194/PEP-420 branch February 12, 2025 10:12
@icemac
Copy link
Member Author

icemac commented Feb 12, 2025

Thank you for reviewing this PR. 😃

@mauritsvanrees
Copy link
Member

Since all packages in the zopefoundation org have a src layout, we could also use automatic package discovery.

That means these lines (plus the import of find_namespace_packages) could be removed:

    packages=find_namespace_packages('src'),
    package_dir={'': 'src'},

@mauritsvanrees
Copy link
Member

I tried it out in Products.GenericSetup by building a wheel (in my case ../../bin/zopepy -m build .), unzipping it, and then comparing. I saw no differences in the included files using the setup.py of current master, or the one after running the current script, or after removing those extra lines.

@coveralls
Copy link

coveralls commented Feb 13, 2025

Pull Request Test Coverage Report for Build 13265640074

Details

  • 0 of 66 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.7%) to 16.634%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/zope/meta/pep_420.py 0 66 0.0%
Totals Coverage Status
Change from base Build 13132027896: -1.7%
Covered Lines: 166
Relevant Lines: 800

💛 - Coveralls

@icemac
Copy link
Member Author

icemac commented Feb 13, 2025

Since all packages in the zopefoundation org have a src layout, we could also use automatic package discovery.

That means these lines (plus the import of find_namespace_packages) could be removed:

    packages=find_namespace_packages('src'),
    package_dir={'': 'src'},

Thank you for investigating: I did this in #305.

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.

4 participants