Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting rid of the easy_install message: : module references __file__

module name: module references __file__

This appears several times when I install my own packages using easy_install and initial google search didn't bring any success.

I am fully aware that I'm using __file__ inside the modules, but there is nothing wrong about it.

How to I get rid of this message without removing __file__ references?

like image 951
sorin Avatar asked Dec 02 '11 20:12

sorin


1 Answers

Found this page while googling the same problem. The solution is:

Tell distutils that your package is not zip_safe (and that this is ok) like this:

setup (name = 'yourmodule',
   ...
   zip_safe = False,
   ...
   )

This way easy_install will not have to parse your module and will not complain about __file__ references.

like image 199
Anton Lopatin Avatar answered Oct 12 '22 19:10

Anton Lopatin