git-archive-all
git-archive-all copied to clipboard
move `git_archive_all{ → /__init__}.py`
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
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]