ivankorobkov / python-inject

Python dependency injection
Apache License 2.0
694 stars 79 forks source link

Move to package layout for mypy compatibility #37

Closed alex-grover closed 5 years ago

alex-grover commented 5 years ago

Follow-up for #36.

As far as I can tell, it's not possible to use mypy with the given single file distribution format because you can't bundle the py.typed file. I moved everything out of src and updated the setup.py.

I don't have much prior experience with setuptools but this seems to be correct based on the docs. Anecdotally, I'm able to pip install git+git://github.com/ajgrover/python-inject#egg=inject and mypy works as expected. Ideally it wouldn't take such a big change to make this work but I spent like 3 hours trying to figure out if it was possible to bundle the required file the way things were set up originally and I couldn't make it work

I also removed the MANIFEST and MANIFEST.in files which aren't used.

Thanks for reading!

ivankorobkov commented 5 years ago

Hi! Thanks for the pull request. I will look into it today.