Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move git_archive_all{ → /__init__}.py #93

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nim65s
Copy link

@nim65s nim65s commented Aug 4, 2023

Hi,

The current distribution archives are not including py.typed and *.pyi, because the git_archive_all module don't contain them.
As a result, on a project which has git_archive_all as dependency, mypy shows: error: Skipping analyzing "git_archive_all": module is installed, but missing library stubs or py.typed marker [import]

A fix for this is to re-organize the module from name.py to name/__init__.py to be able to include other files in name/.

To validate this, here are the logs of python -m wheel -v .

  • Before this PR:
  creating '/tmp/pip-wheel-wuabr55j/git_archive_all-1.23.1-py2.py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
  adding 'git_archive_all.py'
  adding 'git_archive_all-1.23.1.dist-info/LICENSE.txt'
  adding 'git_archive_all-1.23.1.dist-info/METADATA'
  adding 'git_archive_all-1.23.1.dist-info/WHEEL'
  adding 'git_archive_all-1.23.1.dist-info/entry_points.txt'
  adding 'git_archive_all-1.23.1.dist-info/top_level.txt'
  adding 'git_archive_all-1.23.1.dist-info/zip-safe'
  adding 'git_archive_all-1.23.1.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
  Building wheel for git-archive-all (setup.py) ... done
  • and after this PR:
  creating '/tmp/pip-wheel-dulgau14/git_archive_all-1.23.1-py2.py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
  adding 'git_archive_all/__init__.py'
  adding 'git_archive_all/__init__.pyi'
  adding 'git_archive_all/py.typed'
  adding 'git_archive_all-1.23.1.dist-info/LICENSE.txt'
  adding 'git_archive_all-1.23.1.dist-info/METADATA'
  adding 'git_archive_all-1.23.1.dist-info/WHEEL'
  adding 'git_archive_all-1.23.1.dist-info/entry_points.txt'
  adding 'git_archive_all-1.23.1.dist-info/top_level.txt'
  adding 'git_archive_all-1.23.1.dist-info/zip-safe'
  adding 'git_archive_all-1.23.1.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
  Building wheel for git-archive-all (setup.py) ... done

to fix distribution of py.typed and *.pyi
@nim65s nim65s changed the title move git_archive_all.py to git_archive_all/__init__.py move git_archive_all{ → /__init__}.py Aug 4, 2023
nim65s added a commit to cmake-wheel/cmeel that referenced this pull request Aug 4, 2023
@nim65s nim65s marked this pull request as draft August 4, 2023 13:36
@nim65s nim65s marked this pull request as ready for review August 4, 2023 13:51
@nim65s
Copy link
Author

nim65s commented Aug 4, 2023

While here, I'm also adding a type hint for the main function, to fix the following mypy error:

error: Module has no attribute "main"  [attr-defined]

@nim65s
Copy link
Author

nim65s commented Dec 23, 2024

Hi @Kentzo,

This is a little ping : could you have a look at this simple PR ?

Thanks !

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.

1 participant