[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: __file__ is a disease



On Jan 30, 2010, at 4:56 PM, Josselin Mouette wrote:

> Maybe you don’t understand it is a plague, because you are not trying to
> package the things you write with __file__ for a distribution. The
> location of module files on the system should be a hidden implementation
> detail. Because of __file__, it is not and this implementation detail
> has to be exposed by packaging tools, restricting what they can do in
> ways you don’t imagine, making it impossible to just abstract them
> behind the “module” concept - which is the only one that should matter
> for a programmer.

Do you feel the same way about pkg_resources?

> Going back to the topic, please try using autoconf, waf or even cmake to
> distribute your modules. These tools were designed to abstract things
> like filesystem locations and to generate everything needed at
> installation time. Python-specific tools like setuptools are not able to
> do that, not unless you bundle specific scripts with your packages.

I've never used waf or cmake, but tools like autoconf and scons are not trivial systems to use, modify or debug.  I don't think that they make life easier for a robust open source project.

-Barry


Reply to: