sorry forgot to send this to the list.
---------- Forwarded message ---------- From: Jorge Vargas email@example.com Date: Jun 24, 2006 4:13 PM Subject: Re: [Distutils] conditional external packages dependancies with setuptools To: "Phillip J. Eby" firstname.lastname@example.org
On 6/24/06, Phillip J. Eby email@example.com wrote:
At 01:29 PM 6/24/2006 -0400, Jorge Vargas wrote:
On 6/24/06, Phillip J. Eby <mailto:firstname.lastname@example.org@telecommunity.com > wrote:
At 03:04 AM 6/24/2006 -0400, Jorge Vargas wrote:
but What I want to accomplish is having dependancies on some packages.
example my project will have diferent database backends so I want to depend on pysqlite or mysql-python depending on which the user wants
his/her backend. I'm going to have lots of diferent backends, even
that are not databases, so this will be a crutial thing for me or I'll
up with very big dist files per release, which will mostly be waste if
user never uses them.
is something like this possible with setuptools now?
there it says that I can set them and then project depending on mine
be able to add them to their install_required, but what I want is my project to have it optional
there is a reference that they can be pass as commands to easy_install
If you have an optional feature called "bar" for your package named "foo", you would use:
if there's also a "baz" feature and the user wants to install that too, they can use:
ahh yes now I remenber TurboGears uses those.
will there be a way to create defaults for this or maybe provide diferent "instalation scripts" for example <mypackage>-minimal.py equivalente of easy_install <mypackage> <mypackage>-std.py equivalente of easy_install <mypackage> [for,bar] <mypackage>-full.py equivalente of easy_install <mypackage> [for,bar,baz,bazz]
I'm looking at something like the gentoo's USE flags system. where I can
have a script or config file that each install will use with the optional packages they want, and distribute that with a sane number of defaults.
I'm not familiar with this, although it sounds like something that might be useful to add in future. Presumably this could be done by standardizing names of "extras" and then having an option for easy_install (which then would be configurable via the normal distutils config files). I'll keep that in mind for 0.7.
yes indeed is one of the most powerfull feature of emerge. the way it works on gentoo is as follows.
there is a global config file (/etc/make.conf) that has all the global useflags the user has set then each package can set it's own set of useflags
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.
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.
ohh I almost forgot a big part of emerge is build on python, so maybe even some code could be borrow.