I can't see any way to get extras_require to be installed, unless some other package indicates an extra feature in the package that needs to be supported. For example, if you want HTTP support in Paste, you can install WSGIUtils. But this isn't required. How can I get WSGIUtils installed? Or, more specifically, there's a bunch of examples distributed in the Paste source distribution; these examples require lots of extra software, even if Paste doesn't. How can I easily get all the examples working? -- Ian Bicking / ianb@colorstudy.com / http://blog.ianbicking.org
At 02:27 AM 7/13/2005 -0500, Ian Bicking wrote:
I can't see any way to get extras_require to be installed, unless some other package indicates an extra feature in the package that needs to be supported.
For example, if you want HTTP support in Paste, you can install WSGIUtils. But this isn't required. How can I get WSGIUtils installed?
Assuming the "extra" in Paste is "HTTP", you would use: easy_install Paste[HTTP] Even if Paste itself is already installed, this will ensure that anything in extras_require['HTTP'] gets installed too.
Or, more specifically, there's a bunch of examples distributed in the Paste source distribution; these examples require lots of extra software, even if Paste doesn't. How can I easily get all the examples working?
Define an "examples" extra, then use: easy_install Paste[examples] Note, by the way, that if the examples need the HTTP extra, then you can specify that like this: setup( ... extras_require = dict( HTTP = ['WSGIUtils'], examples = ['Paste[HTTP]', ...other stuff here...], ) ) That is, it's okay to have cyclical dependencies; the dependency resolution mechanism is smart enough to figure out what to do.
Phillip J. Eby wrote:
Or, more specifically, there's a bunch of examples distributed in the Paste source distribution; these examples require lots of extra software, even if Paste doesn't. How can I easily get all the examples working?
Define an "examples" extra, then use:
easy_install Paste[examples]
Note, by the way, that if the examples need the HTTP extra, then you can specify that like this:
setup( ... extras_require = dict( HTTP = ['WSGIUtils'], examples = ['Paste[HTTP]', ...other stuff here...], ) )
That is, it's okay to have cyclical dependencies; the dependency resolution mechanism is smart enough to figure out what to do.
Cool... now I'm thinking about how I should distribute the examples. They are already part of the source distribution (i.e., in the MANIFEST but not the packages). They aren't a package at all, really, more like data (even the .py files). I'm not sure what I should be shooting for. This is okay: easy_install.py Paste[HTTP,examples] But this doesn't actually install the examples themselves, just the prerequisites for them. I can't figure out how example installation would work, since examples really aren't installed globally in any way, and shouldn't be eggified. The examples could be separated into a separate package, but I don't think that would help. If easy_install.py had a develop option that would do it. Like: easy_install.py Paste[HTTP,examples] easy_install.py --develop Paste Where --develop downloads the package (not the egg), and does "setup.py develop" or something. Maybe, kind of -- at least, you'd end up with the entire Paste source package, but the prereqs would be installed normally. And I guess if you didn't run the first command, all the prereqs would be installed in development? I don't know. The same issues perhaps apply to documentation (though personally documentation matters much less to me, since it can be published directly to the web). -- Ian Bicking / ianb@colorstudy.com / http://blog.ianbicking.org
At 01:02 PM 7/13/2005 -0500, Ian Bicking wrote:
If easy_install.py had a develop option that would do it. Like:
easy_install.py Paste[HTTP,examples] easy_install.py --develop Paste
Where --develop downloads the package (not the egg), and does "setup.py develop" or something. Maybe, kind of -- at least, you'd end up with the entire Paste source package, but the prereqs would be installed normally.
The problem is no way to make links to checkouts, remember? I guess we could finally implement that anchor idea, and then you could include the link in your PyPI long_description, where easy_install could find it.
And I guess if you didn't run the first command, all the prereqs would be installed in development?
Yeah, the develop command installs dependencies now. Personally, I don't think a --develop option should be recursive; I think it should apply only to the packages you explicitly list.
I don't know. The same issues perhaps apply to documentation (though personally documentation matters much less to me, since it can be published directly to the web).
There might also be some use to having tests appear only in development checkouts, and not in the actual eggs. Setuptools has an undocumented "feature" system that lets you use --with-X and --without-X options to control whether a set of packages or extensions are included in the build, although there are some limitations to its functioning when you don't clean up the "build" directory between option changes. (Which is one reason it's undocumented.)
Phillip J. Eby wrote:
At 01:02 PM 7/13/2005 -0500, Ian Bicking wrote:
If easy_install.py had a develop option that would do it. Like:
easy_install.py Paste[HTTP,examples] easy_install.py --develop Paste
Where --develop downloads the package (not the egg), and does "setup.py develop" or something. Maybe, kind of -- at least, you'd end up with the entire Paste source package, but the prereqs would be installed normally.
The problem is no way to make links to checkouts, remember? I guess we could finally implement that anchor idea, and then you could include the link in your PyPI long_description, where easy_install could find it.
Yes, I was thinking the two went together. I had forgotten about the anchor idea; I'll give that another look and try to produce a patch. What would that link actually look like? http://svn.pythonpaste.org/Paste/trunk#Paste-devel-trunk ? I'm not sure what the version number should be.
And I guess if you didn't run the first command, all the prereqs would be installed in development?
Yeah, the develop command installs dependencies now.
Personally, I don't think a --develop option should be recursive; I think it should apply only to the packages you explicitly list.
That seems sensible to me as well.
I don't know. The same issues perhaps apply to documentation (though personally documentation matters much less to me, since it can be published directly to the web).
There might also be some use to having tests appear only in development checkouts, and not in the actual eggs. Setuptools has an undocumented "feature" system that lets you use --with-X and --without-X options to control whether a set of packages or extensions are included in the build, although there are some limitations to its functioning when you don't clean up the "build" directory between option changes. (Which is one reason it's undocumented.)
What would X be? --with-foo.tests? I go back and forth with including tests in the package that's being tested, or putting it in a sibling directory. Generally I'd see tests as a development files like examples or documentation. Hmm... I can almost see these as being like scripts, being installed in a separate configurable location. -- Ian Bicking / ianb@colorstudy.com / http://blog.ianbicking.org
At 10:59 PM 7/13/2005 -0500, Ian Bicking wrote:
What would that link actually look like? http://svn.pythonpaste.org/Paste/trunk#Paste-devel-trunk ? I'm not sure what the version number should be.
I was assuming it would be like #egg-dev=Paste, just identifying the project, not a version. That doesn't address the possibility of branches, but offhand I'd say that's a YAGNI.
There might also be some use to having tests appear only in development checkouts, and not in the actual eggs. Setuptools has an undocumented "feature" system that lets you use --with-X and --without-X options to control whether a set of packages or extensions are included in the build, although there are some limitations to its functioning when you don't clean up the "build" directory between option changes. (Which is one reason it's undocumented.)
What would X be? --with-foo.tests?
Well, if that was the name of the Feature object, I suppose. :) In practice, you couldn't have a '.'. See: http://svn.eby-sarna.com/PyProtocols/setup.py?view=markup and look at the 'speedups' feature, that implements a --with-speedups/--without-speedups pair.
Phillip J. Eby wrote:
At 02:27 AM 7/13/2005 -0500, Ian Bicking wrote:
I can't see any way to get extras_require to be installed, unless some other package indicates an extra feature in the package that needs to be supported.
For example, if you want HTTP support in Paste, you can install WSGIUtils. But this isn't required. How can I get WSGIUtils installed?
Assuming the "extra" in Paste is "HTTP", you would use:
easy_install Paste[HTTP]
Even if Paste itself is already installed, this will ensure that anything in extras_require['HTTP'] gets installed too.
How can I do this if I have an unpacked version of Paste on disk? I can install that with "easy_install.py .", but I can't do "easy_install.py .[HTTP]". Is there a way to install the dependencies with setup.py? "python setup.py depends" doesn't do much of anything. -- Ian Bicking / ianb@colorstudy.com / http://blog.ianbicking.org
At 10:05 PM 7/13/2005 -0500, Ian Bicking wrote:
Phillip J. Eby wrote:
At 02:27 AM 7/13/2005 -0500, Ian Bicking wrote:
I can't see any way to get extras_require to be installed, unless some other package indicates an extra feature in the package that needs to be supported.
For example, if you want HTTP support in Paste, you can install WSGIUtils. But this isn't required. How can I get WSGIUtils installed?
Assuming the "extra" in Paste is "HTTP", you would use: easy_install Paste[HTTP] Even if Paste itself is already installed, this will ensure that anything in extras_require['HTTP'] gets installed too.
How can I do this if I have an unpacked version of Paste on disk? I can install that with "easy_install.py .", but I can't do "easy_install.py .[HTTP]"
easy_install.py . Paste[HTTP] Or: python setup.py develop easy_install.py Paste[HTTP] In either case, the Paste requirement will be met by the installed (or "developed") version. Of course, it seems like it would be best to add an '--extras' argument to the 'install' and 'develop' commands, as then you could just use --extras=HTTP as an argument to either. I'll look at that for a future release.
Is there a way to install the dependencies with setup.py? "python setup.py depends" doesn't do much of anything.
That's because it's an undocumented command that was never finished. It was based on a much older idea of how to accomplish dependency installation, that didn't involve eggs. It'll go away or be replaced by something useful eventually. :)
participants (2)
-
Ian Bicking
-
Phillip J. Eby