zc.recipe.egg:scripts imports before sys.path

classic Classic list List threaded Threaded
4 messages Options
khink khink
Reply | Threaded
Open this post in threaded view
|

zc.recipe.egg:scripts imports before sys.path

I'm trying to use funkload in a buildout [1]. To create the funkload
scripts [2], i'm using zc.recipe.egg:scripts [3].

When running the scripts, i get "ImportError: No module named
funkload.TestRunner". Indeed the script in {buildout:directory}/bin [4]
first does the import, and then it appends the path of the funkload egg
to sys.path.

I'm thinking that sys.path changes should always be done first, and
since zc.recipe.egg scripts probably work (usually) it would normally
get this right, so i'm assuming there's something in the way the
funkload scripts are written that zc.recipe.egg can't deal with.

I looked in the code of zc.recipe.egg, which uses
zc.buildout.easy_install.scripts(), but couldn't figure out where it
adds the sys.path.

If you think you know what's going wrong, please tell.

Kees

[1] https://github.com/nicolasenno/funkload.buildout
[2] https://github.com/nuxeo/FunkLoad/tree/master/scripts
[3] https://pypi.python.org/pypi/zc.recipe.egg/2.0.0#script-generation
[4] http://pastie.org/8193030


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Güvenlik Elbiseleri Güvenlik Elbiseleri
Reply | Threaded
Open this post in threaded view
|

Re: zc.recipe.egg:scripts imports before sys.path

This post has NOT been accepted by the mailing list yet.
PM ile yardımcı olabilirim.
khink khink
Reply | Threaded
Open this post in threaded view
|

Re: zc.recipe.egg:scripts imports before sys.path

In reply to this post by khink
With zc.buildout = 1.4.4, it does work. There were some changes in
zc.buildout that had something to do with scripts [5]. I'll see if i can
find the commit.

[5] https://pypi.python.org/pypi/zc.buildout/2.2.0#id4

On 07/31/2013 12:22 PM, Kees Hink wrote:

> I'm trying to use funkload in a buildout [1]. To create the funkload
> scripts [2], i'm using zc.recipe.egg:scripts [3].
>
> When running the scripts, i get "ImportError: No module named
> funkload.TestRunner". Indeed the script in {buildout:directory}/bin [4]
> first does the import, and then it appends the path of the funkload egg
> to sys.path.
>
> I'm thinking that sys.path changes should always be done first, and
> since zc.recipe.egg scripts probably work (usually) it would normally
> get this right, so i'm assuming there's something in the way the
> funkload scripts are written that zc.recipe.egg can't deal with.
>
> I looked in the code of zc.recipe.egg, which uses
> zc.buildout.easy_install.scripts(), but couldn't figure out where it
> adds the sys.path.
>
> If you think you know what's going wrong, please tell.
>
> Kees
>
> [1] https://github.com/nicolasenno/funkload.buildout
> [2] https://github.com/nuxeo/FunkLoad/tree/master/scripts
> [3] https://pypi.python.org/pypi/zc.recipe.egg/2.0.0#script-generation
> [4] http://pastie.org/8193030
>
>
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent
> caught up. So what steps can you take to put your SQL databases under
> version control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
>



------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
khink khink
Reply | Threaded
Open this post in threaded view
|

Re: zc.recipe.egg:scripts imports before sys.path

Reported as https://github.com/buildout/buildout/issues/140

On 07/31/2013 01:44 PM, Kees Hink wrote:

> With zc.buildout = 1.4.4, it does work. There were some changes in
> zc.buildout that had something to do with scripts [5]. I'll see if i can
> find the commit.
>
> [5] https://pypi.python.org/pypi/zc.buildout/2.2.0#id4
>
> On 07/31/2013 12:22 PM, Kees Hink wrote:
>> I'm trying to use funkload in a buildout [1]. To create the funkload
>> scripts [2], i'm using zc.recipe.egg:scripts [3].
>>
>> When running the scripts, i get "ImportError: No module named
>> funkload.TestRunner". Indeed the script in {buildout:directory}/bin [4]
>> first does the import, and then it appends the path of the funkload egg
>> to sys.path.
>>
>> I'm thinking that sys.path changes should always be done first, and
>> since zc.recipe.egg scripts probably work (usually) it would normally
>> get this right, so i'm assuming there's something in the way the
>> funkload scripts are written that zc.recipe.egg can't deal with.
>>
>> I looked in the code of zc.recipe.egg, which uses
>> zc.buildout.easy_install.scripts(), but couldn't figure out where it
>> adds the sys.path.
>>
>> If you think you know what's going wrong, please tell.
>>
>> Kees
>>
>> [1] https://github.com/nicolasenno/funkload.buildout
>> [2] https://github.com/nuxeo/FunkLoad/tree/master/scripts
>> [3] https://pypi.python.org/pypi/zc.recipe.egg/2.0.0#script-generation
>> [4] http://pastie.org/8193030
>>
>>
>> ------------------------------------------------------------------------------
>> Get your SQL database under version control now!
>> Version control is standard for application code, but databases havent
>> caught up. So what steps can you take to put your SQL databases under
>> version control? Why should you start doing it? Read more to find out.
>> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
>>
>
>
>
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent
> caught up. So what steps can you take to put your SQL databases under
> version control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
>



------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users