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

Add py.typed file and distribute it upon installation #1344

Merged
merged 1 commit into from Jul 13, 2022

Conversation

felixdivo
Copy link
Collaborator

@felixdivo felixdivo commented Jul 7, 2022

This should allow downstream packages and "end users" to use type checkers more easily.

Fixes #1340.

@felixdivo felixdivo added the QA about improving and maintaining the quality of the library label Jul 7, 2022
@felixdivo felixdivo self-assigned this Jul 7, 2022
@felixdivo
Copy link
Collaborator Author

@rumpelsepp Do you mind checking if this change works for you? This should work:

pip uninstall python-can
pip install git+https://github.com/felixdivo/python-can.git@add-py.typed-file-marker

@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #1344 (15013a6) into develop (5bca2d7) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1344   +/-   ##
========================================
  Coverage    66.01%   66.01%           
========================================
  Files           86       86           
  Lines         8960     8960           
========================================
  Hits          5915     5915           
  Misses        3045     3045           

@felixdivo
Copy link
Collaborator Author

I guess that the failing test has nothing to do with the change.

@zariiii9003
Copy link
Collaborator

Is the setup.py entry sufficient for it to be included in the source distribution?

@felixdivo
Copy link
Collaborator Author

Is the setup.py entry sufficient for it to be included in the source distribution?

Yes, that appears to work. I opened a python:3 Docker image, produced a source distribution with python setup.py sdist bdist_wheel and then inspected the generated distribution file dist/python-can-4.0.0.tar.gz. It contains the marker file.

@zariiii9003 zariiii9003 merged commit 3ae0879 into hardbyte:develop Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA about improving and maintaining the quality of the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include a py.typed file so mypy works for downstream packages
2 participants