Closed
Description
In trying to provide more information on #1319 I ran into lots of problems with trying to set MYPYPATH
. There doesn't seem to be any documentation on how it should be set.
For example my library has the following __init__.py
file:
from distutils.version import StrictVersion
VERSION = StrictVersion('0.0.1')
This seems to cause mypy a lot of problems.
My project uses virtualenv
and pip
to install packages, sys.path
looks as follows:
['',
'/home/samuel/code/harrier/env/lib/python35.zip',
'/home/samuel/code/harrier/env/lib/python3.5',
'/home/samuel/code/harrier/env/lib/python3.5/plat-x86_64-linux-gnu',
'/home/samuel/code/harrier/env/lib/python3.5/lib-dynload',
'/usr/lib/python3.5',
'/usr/lib/python3.5/plat-x86_64-linux-gnu',
'/home/samuel/code/harrier/env/lib/python3.5/site-packages']
What value should I set MYPYPATH
to to allow checking a script including distutils.version
? All the things I tried failed.
I think partially related to #1293.