On Sep 12, 2014, at 11:55 AM, Julien Danjou <jul...@danjou.info> wrote:

> On Fri, Sep 12 2014, Sean Dague wrote:
> 
>> Which sets PYTHONDONTWRITEBYTECODE=true in the unit tests.
>> 
>> This prevents pyc files from being writen in your git tree (win!). It
>> doesn't seem to impact what pip installs... and if anyone knows how to
>> prevent those pyc files from getting created, that would be great.
>> 
>> But it's something which hopefully causes less perceived developer
>> fragility of the system.
> 
> I understand it's generating .pyc could be something, but I don't really
> like that patch.
> 
> I guess the problem is more likely that testrepository load the tests
> From the source directory whereas maybe we could make it load them from
> what's installed into the venv?

we do this in oslo.db by doing an install within tox.ini and then making sure 
we don’t set usedevelop.  However, oslo.db does this because there’s issues 
with using namespace packages (e.g. oslo/db, oslo/utils, etc.) when you mix up 
installs with develop installations.   I hate it, and I’d like to someday solve 
that problem differently (locally I will often manually craft a test 
environment with PYTHONPATH just to avoid it).  I run different test runners 
based on what I’m trying to do and I skip tox for running individual tests, so 
this behavior gets in my way constantly, whereas the .pyc file issue almost 
never.

So IMO this approach as a means to get around the infrequent .pyc annoyance 
introduces lots more inconvenience than it saves.












> 
> -- 
> Julien Danjou
> /* Free Software hacker
>   http://julien.danjou.info */
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to