Hisham Muhammad wrote:
> On 11/5/07, Jonatan Liljedahl <[EMAIL PROTECTED]> wrote:
>> Hisham Muhammad wrote:
>>> On 11/5/07, Jonatan Liljedahl <[EMAIL PROTECTED]> wrote:
>>>> Hisham Muhammad wrote:
>>>>> On 11/5/07, Jonatan Liljedahl <[EMAIL PROTECTED]> wrote:
>>>>>> I've made a recipe for latest CSound.
>>>>>> It uses Scons, but it installs not with scons.py install but with
>>>>>> install.py, I tried this:
>>>>>>
>>>>>> recipe_type=scons
>>>>>> scons_variables=(
>>>>>> "prefix=$target"
>>>>>> )
>>>>>> sandbox_options=(
>>>>>> "--command install.py --prefix=$target"
>>>>>> )
>>>> Why was this ignored by the scons type recipe, is it because it doesn't
>>>> actually use the sandbox?
>>> It does, but Compile already supplies --command, so it probably got 
>>> overridden.
>>>
>>>>>> But it didn't work, instead I had to do this:
>>>>>>
>>>>>> do_install=no
>>>>>> pre_link() {
>>>>>>   ./install.py --prefix=$target
>>>>>> }
>>>>> You can do
>>>>>
>>>>> build_script=install.py
>>>>>
>>>>> (We try to autodetect setup.py, configure.py and build.py... will add
>>>>> install.py to the list in a future version.)
>>>> What does it mean that it's called *build* script?
>>> Not the best name, true... :-\
>>>
>>>> Is there no
>>>> install_script variable?
>>> No, build_script is used both for build and install.
>>>
>>>> And how do I pass "--prefix=$target" to it? It
>>>> would also be nice to run it in the sandbox...
>>> Oh, wait a second. I just realized I got things mixed up here.
>>> build_script, etc., are for the "recipe_type=python" type, not for
>>> "recipe_type=scons". From the looks of your recipe's needs (which call
>>> a .py script and pass options to it), you may want to use
>>> "recipe_type=python instead. Unless you need to call scons to build
>>> and install.py to make, in which case it is a weird mix of the two
>>> recipe types... :\ In that case the way you did it is the right one.
>> Yes, scons is used to build, and install.py is used to install. It's
>> indeed strange... The SConstruct didn't have any install target.
>>
>> But, it would anyhow be nice if I could run the install script inside
>> the sandbox, is that possible?
> 
> Not directly now. It would be possible to call install.py through
> SandboxInstall in the pre_link rule. I hope to make hook functions run
> sandboxed in the future, but this would break many current recipes so
> I'm postponing this change.

Couldn't there be an "install_command" that works in all recipe types
and run the args in SandboxInstall? Then I would just do:
install_command="install.py --prefix=$target"

-- 
/Jonatan         [ http://kymatica.com ]
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to