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

Version 1.1.0 is missing the py.typed marker #112

Open
xen0n opened this issue Jan 18, 2024 · 2 comments
Open

Version 1.1.0 is missing the py.typed marker #112

xen0n opened this issue Jan 18, 2024 · 2 comments

Comments

@xen0n
Copy link

xen0n commented Jan 18, 2024

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...)

@merwok
Copy link

merwok commented Jan 18, 2024

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

@arjache
Copy link

arjache commented Feb 18, 2024

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:

- name: Install dependencies
run: |
pip install setuptools wheel twine

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants