python-frontmatter icon indicating copy to clipboard operation
python-frontmatter copied to clipboard

Version 1.1.0 is missing the py.typed marker

Open xen0n opened this issue 1 year ago • 2 comments

Hi, first of all, thanks for making this nice library!

I just saw #110 and the new release which is nice, but mypy on my project still complains about missing type stubs or py.typed marker. Indeed the marker file seems missing in the PyPI source tarball or wheel. The file needs to be explicitly included in the setup.py machinery.

Would someone step up and fix it? (I didn't write Python for 5+ years, so I completely forgot how to do that with traditional setup.py setups. With Poetry it's a simple include = [".../py.typed"] though...)

xen0n avatar Jan 18 '24 06:01 xen0n

It should be installed because there is include_package_data=True, but maybe it’s not even packaged because it’s not in MANIFEST.in

merwok avatar Jan 18 '24 14:01 merwok

Recent versions of setuptools will include this file automatically: https://github.com/pypa/setuptools/pull/4021/files

I ran python setup.py sdist bdist_wheel with a new setuptools and verified the file was copied:

adding 'frontmatter/py.typed'

I think the problem is that the GitHub Actions publish workflow is using an older setuptools. This log shows it's using an already installed version: https://github.com/eyeseast/python-frontmatter/actions/runs/7546165876/job/20543352625#step:5:12

You might be able to fix this by changing this line to pip install --upgrade setuptools wheel twine: https://github.com/eyeseast/python-frontmatter/blob/025a94c284ad0a050851eeffebbf527c9c055fe3/.github/workflows/publish.yml#L47-L49

I'd offer to submit a PR, but for obvious reasons I wouldn't be able to verify any changes.

arjache avatar Feb 18 '24 12:02 arjache