sorry forgot to send this to the list.<br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Jorge Vargas</b> <<a href="mailto:jorge.vargas@gmail.com">jorge.vargas@gmail.com
</a>><br>Date: Jun 24, 2006 4:13 PM<br>Subject: Re: [Distutils] conditional external packages dependancies with setuptools<br>To: "Phillip J. Eby" <<a href="mailto:pje@telecommunity.com">pje@telecommunity.com
</a>><br><br></span><div><span class="e" id="q_10c07acd15cb0af5_0">On 6/24/06, <b class="gmail_sendername">Phillip J. Eby</b> <<a href="mailto:pje@telecommunity.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
pje@telecommunity.com</a>> wrote:</span></div><div><div></div><div><span class="e" id="q_10c07acd15cb0af5_2"><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At 01:29 PM 6/24/2006 -0400, Jorge Vargas wrote:<br>>On 6/24/06, Phillip J. Eby<br>><<mailto:<a href="mailto:pje@telecommunity.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pje@telecommunity.com
</a>><a href="mailto:pje@telecommunity.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pje@telecommunity.com
</a>> wrote:<br>>>At 03:04 AM 6/24/2006 -0400, Jorge Vargas wrote:<br>>> >but What I want to accomplish is having dependancies on some packages. for<br>>> >example my project will have diferent database backends so I want to
<br>>> >depend on pysqlite or mysql-python depending on which the user wants as<br>>> >his/her backend. I'm going to have lots of diferent backends, even some<br>>> >that are not databases, so this will be a crutial thing for me or I'll end
<br>>> >up with very big dist files per release, which will mostly be waste if the<br>>> >user never uses them.<br>>> ><br>>> >is something like this possible with setuptools now?<br>>>
<br>>>Yes:<br>>><br>>><<a href="http://peak.telecommunity.com/DevCenter/setuptools#declaring-extras" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://peak.telecommunity.com/DevCenter/setuptools#declaring-extras
</a>><a href="http://peak.telecommunity.com/DevCenter/setuptools#declaring-extras" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://peak.telecommunity.com/DevCenter/setuptools#declaring-extras</a><br>>><br>><br>>there it says that I can set them and then project depending on mine will<br>>be able to add them to their install_required, but what I want is my
<br>>project to have it optional<br>><br>>there is a reference that they can be pass as commands to easy_install but<br>>can't find the switch at<br>><<a href="http://peak.telecommunity.com/DevCenter/EasyInstall#command-line-options" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://peak.telecommunity.com/DevCenter/EasyInstall#command-line-options</a>><a href="http://peak.telecommunity.com/DevCenter/EasyInstall#command-line-options" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://peak.telecommunity.com/DevCenter/EasyInstall#command-line-options
</a><br><br>If you have an optional feature called "bar" for your package named "foo",<br>you would use:<br><br> easy_install foo[bar]<br><br>if there's also a "baz" feature and the user wants to install that too,
<br>they can use:<br><br> easy_install foo[bar,baz]</blockquote></span></div><div><div><br>ahh yes now I remenber TurboGears uses those.<br><br>will there be a way to create defaults for this or maybe provide diferent "instalation scripts" for example
<br><mypackage>-minimal.py equivalente of easy_install <mypackage><br><mypackage>-std.py equivalente of easy_install <mypackage> [for,bar]<br><mypackage>-full.py equivalente of easy_install <mypackage> [for,bar,baz,bazz]
<br><br></div></div><div><span class="q"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">>I'm looking at something like the gentoo's USE flags system. where I can
<br>>have a script or config file that each install will use with the optional<br>>packages they want, and distribute that with a sane number of defaults.<br><br>I'm not familiar with this, although it sounds like something that might be
<br>useful to add in future. Presumably this could be done by standardizing<br>names of "extras" and then having an option for easy_install (which then<br>would be configurable via the normal distutils config files). I'll keep
<br>that in mind for 0.7.</blockquote></span></div><div><div><br>yes indeed is one of the most powerfull feature of emerge. the way it works on gentoo is as follows.<br><br>there is a global config file (/etc/make.conf) that has all the global useflags the user has set
<br>then each package can set it's own set of useflags <br><br>so when someone installs something the engine sets its global flags and then looks for package specific (package.use) and then for commandline flags, although commandline in gentoo is deprecated due to errors in stuff like package A I needs foo compile with bar support... anyway.
<br><br>I'll love to see something like this for setuptools this will make it easier to integrate into gentoo since one of the biggest problems right now with easy_install in gentoo is the lack of flexibility in the instalation.
<br><br>ohh I almost forgot a big part of emerge is build on python, so maybe even some code could be borrow.<br></div><br></div><br>
</div>