On Mon, Mar 26, 2012 at 11:23 PM, Stephen J. Turnbull <step...@xemacs.org>wrote:
> On Tue, Mar 27, 2012 at 1:35 AM, PJ Eby <p...@telecommunity.com> wrote: > > On Sun, Mar 25, 2012 at 2:56 AM, Stephen J. Turnbull <step...@xemacs.org > > > > wrote: > >> > >> But since he's arguing the > >> other end in the directory layout thread (where he says there are many > >> special ways to invoke Python so that having different layouts on > >> different platforms is easy to work around), I can't give much weight > >> to his preference here. > > > > > > You're misconstruing my argument there: I said, rather, that the One > Obvious > > Way to deploy a Python application is to dump everything in one > directory, > > as that is the one way that Python has supported for at least 15 years > now. > > It's not at all obvious on any of the open source platforms (Cygwin, > Debian, > Gentoo, and MacPorts) that I use. In all cases, both several python > binaries > and installed libraries end up in standard places in the distro-maintained > hierarchies, and it is not hard to confuse the distro-installed Pythons. > Really? I've been doing "dump the app in a directory" since 1998 or so on various *nix platforms. And when distutils came along, I set up a user-specific cfg to install in the same directory. ISTR a 5-line pydistutils.cfg is sufficient to make everything go into to a particular directory, for packages using distutils for installation. Being confident that one knows enough to set up a single directory correctly > in the face of some of the unlovely things that packages may do requires > more knowledge of how Python's import etc works than I can boast: > virtualenv is a godsend. By analogy, yes, I think it makes sense to ask > you > to learn a bit about CSS and add a single line like "body { width: 65em; > }" to > your local config. That's one reason why CSS is designed to cascade. > That line won't work - it'll make the entire page that width, instead of just text paragraphs. (Plus, it should only be the *maximum* width - i.e. max-width.) Unfortunately, there's no way to identify the correct selector to use on all sites to select just the right elements to set max-width on - not all text is in "p", sometimes preformatted text is in a p with styles setting the formatting to be preformatted. (In other words, I actually do know a little about CSS - enough to know your idea won't actually work without tweaking it for different sites. I have enough Greasemonkey scripts as it is, never mind custom CSS.) > The comparison to CSS is also lost on me here; creating user-specific CSS > is > > more aptly comparable telling people to write their own virtualenv > > implementations from scratch, and resizing the browser window is more > akin > > to telling people to create a virtualenv every time they *run* the > > application, rather than just once when installing it. > > Huh, if you say so -- I didn't realize that virtualenv did so little that > it could be written in one line. Around 3-5 lines for dumping everything into a single directory. If you need multiple such directories at any one time, you can alternately pass --install-lib and --install-scripts to "setup.py install" when you install things. Or you can use easy_install and just specify the -d (--install-dir) option. Or, you could use the PYTHONHOME solution I described here in 2005: http://svn.python.org/view/sandbox/trunk/setuptools/EasyInstall.txt?r1=41220&r2=41221 Ian Bicking turned those instructions into a script, which he then gradually evolved into what we now know as virtualenv. Before that happened, though, I was deluged with complaints from people who were using "dump it in a directory somewhere" on *nix platforms and didn't want to have anything to do with those danged newfangled virtual whatchacallits. ;-) I mention this for context: my generic perception of virtualenv is that it's a fancy version of PYTHONHOME for people who can't install to site-packages and for some reason don't just dump their files in a PYTHONPATH directory like all those complaining people obviously did. ;-) All I know (and care) is > that it promises to do all that stuff for me, and without affecting the > general public (ie, the distro-provided Python apps). > > And that's why I think the width of pages containing flowed text > should be left up to the user to configure. > Your analogy is backwards: virtualenv is a generic, does-it-all-for-you, no need to touch it solution. User CSS and window sizes have to specified per-site. (Note that it doesn't suffice to use a small window to get optimal wrap width: you have to resize to allow for navigation bars, multiple columns, etc.) I think we should just agree to disagree; there's virtually no way I'm going to be convinced on either of these points. (I do, however, remain open to learning something new about virtualenv, if it actually does something besides make it possible for you to deal with ill-behaved setup scripts and installation tools that won't just let you point them at a single directory and have done with it.)
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com