Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip)

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


kiorky at cryptelium

Oct 8, 2009, 3:00 AM

Post #1 of 19 (1352 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip)

Tarek Ziadé a écrit :
> Here's a quick summary of the main things that are going to happen in
> Distutils, and Distribute, and a few words on virtualenv and pip.
> (there is much much more work going on, but I don't want to drown
> people with details)
>
> = Distutils =
>
> Distutils is a package manager and competes with OS package managers.
> This is a good thing because, unless you are developing a library or
> an application that will only run one specific system that has its own
> packaging system like Debian, you will be able to reach much more
> people. Of course the goal is to avoid making the work of a Debian
> packager (or any other OS that has a package manager) too hard. In
> other words, re-packaging a Distutils-based project should be easy and
> Distutils should not get in their way (or as less as possible).
>
> But right now Distutils is incomplete in many ways and we are trying to fix'em.
>
> == What's installed ? what's the installation format ? how to uninstall ? ==
>
> First, it's an incomplete package manager : you can install a
> distribution using it, but there's no way to list installed
> distributions. Worst, you can't uninstall a distribution.
>
> PEP 376 resolves this, and once it's finished, the goal is to include
> the APIs described there into Distutils itself and into the pkgutil
> module in stdlib. Notice that there's an implementation at
> http://bitbucket.org/tarek/pep376 that is kept up to date with PEP 376
> so people can see what we are talking about.
>
> Another problem that popped during the last years is the fact that, in
> the same site-packages, depending on the tool that was used to install
> a Distribution, and depending if this distribution uses Distutils or
> Setuptools, you can have different installation formats.
>
> End-users end up with zipped eggs (one file), unzipped eggs (one
> self-contained format in a directory) and regular Distutils (packages
> and modules in site-packages). And the Metadata are also located in
> many different places depending on the installation format used.
>
> That can't be. there's no point to keep various installation format in
> the *same* site-packages directory.
>
> PEP 376 also resolves this by describing a *unique* format that works
> for all. Once this is finished, Distutils will implement it by
> changing the install command accordingly.
>
> - Work left to do in PEP 376 : restrict its scope to a disk-based,
> file-based site-packages.
> - Goal: 2.7 / 3.2
>
> == Dependencies ==
>
> The other feature that makes a packaging system nice is dependencies.
> e.g. a way to list in a distribution, the distributions it requires to
> run. As a matter of fact, PEP 314 has introduced in the Metadata new
> fields for this purpose ("Requires", "Provides and "Obsoletes"). So,
> you can write things like "Requires: lxml >= 2.2.1", meaning that your
> distribution requires lxml 2.2.1 or a newer version to run. But this
> was just description fields and Distutils was not providing any
> feature based on these new fields.
>
> In fact, no third-party tool either provided a feature based on those
> fields. Setuptools provided "easy_install" a script that looks for the
> dependencies and install them, by querying the Python Package Index
> (PyPI). But this feature was implemented with its own metadata: you
> can add an "install_requires" option in the setup() call in setup.py,
> and it will end up in a "requires.txt" file at installation time that
> is located alongside the Metadata for you distribution.
>
> So the goal is to review PEP 314 and update the Metadata w.r.t. the
> setuptools feedback and community usage. Once it's done, Distutils
> will implement this new metadata version and promote its usage.
> Promoting its usage means that Distutils will provide some APIs to
> work with these APIs, like a version comparison algorithm.
>
> And while we're at it, we need to work out some inconsistency with the
> "Author" and "Maintainer" fields. (The latter doesn't exists in the
> Metadata but exists on setup.py side).
>
> - Work left to do in PEP 314 : finish PEP 386, finish the discussion
> on the "maintainer" field.
> - Goal: 2.7 / 3.2
>
> == Version comparison ==
>
> Once you provide dependency fields in the metadata, you need to
> provide a version scheme: a way to compare two versions. Distutils has
> two version comparison algorithms that are not used in its code and in
> only one place in the stdlib where it could be removed with no pain.
> One version scheme is "strict" and one is "loose". And Setuptools has
> another one, which is more heuristic (it will deal with any version
> string and compare it, wether it's wrong or not).
>
> PEP 386 goal is to describe a version scheme that can be used by all
> and if we can meet a consensus there, we can move on and add
> it as a reference in the update done in PEP 314, besides the
> dependencies fields. Then, in Distutils we can deprecate the existing
> version
> comparison algorithms and provide a new one based on PEP 386 and
> promote its usage.
>
> One very important point: we will not force the community to use the
> scheme described in PEP 386, but *there is* already a
> de-facto convention on version schemes at PyPI if you use Pip or
> easy_install, so let's have a documented standard for this,
> and a reference implementation in Distutils.
>
> There's an implementation at
> http://bitbucket.org/tarek/distutilsversion that is kept up-to-date
> with PEP 386.
>
> - Work left to do in PEP 386 : another round with the community
> - Goal: 2.7 / 3.2
>
> == The fate of setup.py, and static metadata ==
>
> Setup.py is a CLI to create distribution, install them etc. You can
> also use it to retrieve the metadata of a distribution. For
> example you can call "python setup.py --name" and the name will be
> displayed. That's fine. That's great for developers.
>
> But there's a major flaw: it's Python code. It's a problem because,
> depending on the complexity of this file, an OS packager that just
> wants to get the metadata for the platform he's working on, will run
> arbitrary code that mught do unwanted things (or even that light not
> work)
>
> So we are going to separate the metadata description from setup.py, in
> a static configuration file, that can be open and read by anyone
> without
> running any code. The only problem with this is the fact that some
> metadata fields might depend on the execution environment. For
> instance, once "Requires" is re-defined and re-introduced via PEP 314,
> we will have cases where "pywin32" will be a dependency to have only
> on win32 systems.
>
> So we've worked on that lately in Distutils-SIG and came up with a
> micro-language, based on a ConfigParser file, that allows
> writing metadata fields that depends on sys.platform etc. I won't
> detail the syntax here but the idea is that the interpretation
> of this file can be done with a vanilla Python without running arbitrary code.
>
> In other words : we will be able to get the metadata for a
> distribution without having to install it or to run any setup.py
> command.
> One use case is the ability to list all dependencies a distribution
> requires for a given platform, just by querying PyPI.
>
> So I am adding this in Distutils for 2.7.
>
> Of course setup.py stays, and this is backward compatible.
>
> - Work left to do : publish the final syntax, and do the implementation
> - Goal: 2.7 / 3.2
>
> == The fate of bdist_* commands ==
>
> During last Pycon summit we said that we would remove commands like
> bdist_rpm because Python is unable, due to its release cycle,
> to do a good work there. Here's an example: I have from time to time
> cryptic issues in the issue tracker from people from Fedora (or any
> rpm-based system), and I have all the pain in the world for these very
> specific problems to do the proper fix unless some RPM expert helps
> around. And by the time it's detected then fixed, it can be year(s)
> before it's available on their side. That's why, depending on the
> communities, commands like bdist_rpm are just totally ignored, and OS
> packager have their own tools.
>
> So the best way to handle this is to ask these communities to build
> their own tool and to encourage them to use Distutils as a basis for
> that.
>
> This does not concern bdist_* commands for win32 because those are
> very stable and don't change too much: Windows doesn't have a package
> manager that would require these commands to evolve with it.
>
> Anyways, when we said that we would remove bdist_rpm, this was very
> controversial because some people use it and love it.
>
> So what is going to happen is a status-quo: no bdist_* command will be
> removed but no new bdist_* command wil be added. That's why I've
> encouraged Andrew and Garry, that are working on a bdist_deb command,
> to keep it in the "stdeb" project, and eventually we will
> refer to it in the Distutils documentation if this bdist_deb comply
> with Distutils standard. It doesn't right now because it uses a
> custom version of the Distribution class (through Setuptools) that
> doesn't behave like Distutils' one anymore.
>
> For Distutils, I'll add some documentation explaining this, and a
> section that will list community-driven commands.
>
> - Work left to do : write the documentation
> - Goal: 2.7 / 3.2
>
> = Distribute =
>
> I won't explain here again why we have forked, I think it's obvious to
> anyone here now. I'll rather explain what
> we are planning in Distribute and how it will interact with Distutils.
>
> Distribute has two branches:
>
> - 0.6.x : provides a Setuptools-0.6c9 compatible version
> - 0.7.x : will provide a refactoring
>
> == 0.6.x ==
>
> Not "much" is going to happen here, we want this branch to be helpful
> to the community *today* by addressing the 40-or-so bugs
> that were found in Setuptools and never fixed. This is eventually
> happen soon because its development is
> fast : there are up to 5 commiters that are working on it very often
> (and the number grows weekly.)
>
> The biggest issue with this branch is that it is providing the same
> packages and modules setuptools does, and this
> requires some bootstrapping work where we make sure once Distribute is
> installed, all Distribution that requires Setuptools
> will continue to work. This is done by faking the metadata of
> Setuptools 0.6c9. That's the only way we found to do this.
>
> There's one major thing though: thanks to the work of Lennart, Alex,
> Martin, this branch supports Python 3,
> which is great to have to speed up Py3 adoption.
>
> The goal of the 0.6.x is to remove as much bugs as we can, and try if
> possible to remove the patches done
> on Distutils. We will support 0.6.x maintenance for years and we will
> promote its usage everywhere instead of
> Setuptools.
>
> Some new commands are added there, when they are helpful and don't
> interact with the rest. I am thinking
> about "upload_docs" that let you upload documentation to PyPI. The
> goal is to move it to Distutils
> at some point, if the documentation feature of PyPI stays and starts to be used.
>
> == 0.7.x ==
>
> We've started to refactor Distribute with this roadmap in mind (and
> no, as someone said, it's not vaporware,
> we've done a lot already)
>
> - 0.7.x can be installed and used with 0.6.x
>
> - easy_install is going to be deprecated ! use Pip !
>
> - the version system will be deprecated, in favor of the one in Distutils
>
> - no more Distutils monkey-patch that happens once you use the code
> (things like 'from distutils import cmd; cmd.Command = CustomCommand')
>
> - no more custom site.py (that is: if something misses in Python's
> site.py we'll add it there instead of patching it)
>
> - no more namespaced packages system, if PEP 381 (namespaces package
> support) makes it to 2.7
>
> - The code is splitted in many packages and might be distributed under
> several distributions.
>
> - distribute.resources: that's the old pkg_resources, but
> reorganized in clean, pep-8 modules. This package will
> only contain the query APIs and will focus on being PEP 376
> compatible. We will promote its usage and see if Pip wants
> to use it as a basis. And maybe PyPM once it's open source ?
> (<hint> <hint>).
> It will probably shrink a lot though, once the stdlib provides PEP 376 support.
>
> - distribute.entrypoints: that's the old pkg_resources entry points
> system, but on its own. it uses distribute.resources
>
> - distribute.index: that's package_index and a few other things.
> everything required to interact with PyPI. We will promote
> its usage and see if Pip wants to use it as a basis.
>
> - distribute.core (might be renamed to main): that's everything
> else, and uses the other packages.
>
>
> Goal: A first release before (or when) Python 2.7 / 3.2 is out.
>
>
> = Virtualenv and the multiple version support in Distribute =
>
> (I am not saying "We" here because this part was not discussed yet
> with everyone)
>
> Virtualenv allows you to create an isolated environment to install
> some distribution without polluting the
> main site-packages, a bit like a user site-packages.
>
> My opinion is that this tool exists only because Python doesn't
> support the installation of multiple versions for the same
> distributions.

Not only, for me it exists also to provide a way to isolate/chroot an
application from the host system.


> But if PEP 376 and PEP 386 support are added in Python, we're not far
> from being able to provide multiple version support with
> the help of importlib.
>
> Setuptools provided a multiple version support but I don't like its
> implementation and the way its works.
> I would like to create a new site-packages format that can contains
> several versions of the same distribution, and :
>
> - a special import system using importlib that would automatically
> pick the latest version, thanks to PEP 376.
> - an API to force at runtime a specific version (that would be located
> at the beginning of all imports, like __future__)
> - a layout that is compatible with the way OS packagers works with
> python packages
>
> Goal: a prototype asap (one was started under the "VSP" name (virtual
> site-packages) but not finished yet)
>
> Regards
> Tarek
>

--
--
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF
Attachments: signature.asc (0.25 KB)


mal at egenix

Oct 8, 2009, 4:27 AM

Post #2 of 19 (1317 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

I have just a few comments to make, so I'm trimming the long quote
a bit...

> Tarek Ziadé a écrit :
>> == Version comparison ==
>>
>> One very important point: we will not force the community to use the
>> scheme described in PEP 386, but *there is* already a
>> de-facto convention on version schemes at PyPI if you use Pip or
>> easy_install, so let's have a documented standard for this,
>> and a reference implementation in Distutils.
>>
>> There's an implementation at
>> http://bitbucket.org/tarek/distutilsversion that is kept up-to-date
>> with PEP 386.
>>
>> - Work left to do in PEP 386 : another round with the community
>> - Goal: 2.7 / 3.2

Please make sure that the version scheme is compatible with
other tools we use in the distutils chain: RPM and the MSI
compiler.

Some data points: RPM doesn't like hyphens in version strings.
MSI requires a strict N.N.N format.

>> == The fate of setup.py, and static metadata ==
>>
>> So we are going to separate the metadata description from setup.py, in
>> a static configuration file, that can be open and read by anyone
>> without
>> running any code. The only problem with this is the fact that some
>> metadata fields might depend on the execution environment. For
>> instance, once "Requires" is re-defined and re-introduced via PEP 314,
>> we will have cases where "pywin32" will be a dependency to have only
>> on win32 systems.

How are you planning to deal with dynamic version strings, e.g.
say you want to build a snapshot release the current date and
revision number included in the version string ?

I suppose this file is going to be uploaded to PyPI, so the
file would have to be formatted at build time and include
markers to be replaced with values taken from the distribution
meta-data.

>> - Work left to do : publish the final syntax, and do the implementation

Is there a PEP for this ?

>> == The fate of bdist_* commands ==
>>
>> So the best way to handle this is to ask these communities to build
>> their own tool and to encourage them to use Distutils as a basis for
>> that.

Rather than having external communities build their own
tools and then basically fork distutils in order to get
these implemented, I think it'd be better to make the
set of distutils commands extensible via namespace packages.

>> So what is going to happen is a status-quo: no bdist_* command will be
>> removed but no new bdist_* command will be added.

I hope that comment means "no new bdist_* command will be added
*right now*". It's well possible to create new bdist_* commands
that don't rely on external tool chains or only on ones that
don't change often.

I'm thinking of bdist_inno (Windows installer using InnoSetup)
and bdist_nsis (Windows installer using NSIS) here.

>> = Virtualenv and the multiple version support in Distribute =
>>
>> (I am not saying "We" here because this part was not discussed yet
>> with everyone)
>>
>> Virtualenv allows you to create an isolated environment to install
>> some distribution without polluting the
>> main site-packages, a bit like a user site-packages.
>>
>> My opinion is that this tool exists only because Python doesn't
>> support the installation of multiple versions for the same
>> distributions.
>
> Not only, for me it exists also to provide a way to isolate/chroot an
> application from the host system.

I agree: IMHO, that's the main use case for things like virtualenv.

Note that Python has had a PYTHONHOME environment variable for ages.
This pretty much serves the same purpose and together with setting
PYTHONPATH can easily be used to create your own private Python
universe.

>> But if PEP 376 and PEP 386 support are added in Python, we're not far
>> from being able to provide multiple version support with
>> the help of importlib.

Before putting much work into this: do you really think that having
multiple versions of the same package in the same Python installation
is a good idea ?

Examples:
What if you have an application that uses two modules which each
require two different versions of the same package ? Would that
load the same package twice, causing globals used by these package
to no work (e.g. isinstance(x, class_name) or global caches) ?

This sounds a lot like DLL- or RPM-hell to me.

I think it's much better to keep things simple and under user
control, e.g. by encouraging use of virtualenv-like setups
and perhaps adding better native support for these to Python.

If the user finds that there's a version conflict this can
then be resolved during environment setup instead of hoping
for the best and waiting for application failures at run-time.

--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source (#1, Oct 08 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


solipsis at pitrou

Oct 8, 2009, 4:43 AM

Post #3 of 19 (1319 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

Hello,

Thanks for the summary :)

[Distribute 0.7]
> - easy_install is going to be deprecated ! use Pip !

Apparently there are a couple of things Pip doesn't support:

« It cannot install from eggs. It only installs from source. (Maybe this
will be changed sometime, but it’s low priority.) »
« It is incompatible with some packages that customize distutils or
setuptools in their setup.py files. »
« Maybe it doesn’t work on Windows. At least, the author doesn’t test on
Windows often. »

(from http://pip.openplans.org/#differences-from-easy-install)

> Virtualenv allows you to create an isolated environment to install
> some distribution without polluting the
> main site-packages, a bit like a user site-packages.
>
> My opinion is that this tool exists only because Python doesn't
> support the installation of multiple versions for the same
> distributions.

virtualenv has the virtue of keeping your main installation clean and
manageable. Besides, as someone said, it also allows you to create
completely isolated environments if you want full control over your
deployment
(especially when you're not the sysadmin).

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


solipsis at pitrou

Oct 8, 2009, 4:47 AM

Post #4 of 19 (1316 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

Le Thu, 08 Oct 2009 13:27:57 +0200, M.-A. Lemburg a écrit :
>
> This sounds a lot like DLL- or RPM-hell to me.
>
> I think it's much better to keep things simple and under user control,
> e.g. by encouraging use of virtualenv-like setups and perhaps adding
> better native support for these to Python.

Agreed.

virtualenv enables a feature while keeping things simple and clear.
The proposed scheme (multi-versioned stuff) is supposed to enable the
same feature, but by making things more complicated. ;)

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ziade.tarek at gmail

Oct 8, 2009, 5:54 AM

Post #5 of 19 (1315 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

On Thu, Oct 8, 2009 at 1:27 PM, M.-A. Lemburg <mal [at] egenix> wrote:
>
>>> == The fate of setup.py, and static metadata ==
>>>
>>> So we are going to separate the metadata description from setup.py, in
>>> a static configuration file, that can be open and read by anyone
>>> without
>>> running any code. The only problem with this is the fact that some
>>> metadata fields might depend on the execution environment. For
>>> instance, once "Requires" is re-defined and re-introduced via PEP 314,
>>> we will have cases where "pywin32" will be a dependency to have only
>>> on win32 systems.
>
> How are you planning to deal with dynamic version strings, e.g.
> say you want to build a snapshot release the current date and
> revision number included in the version string ?
>
> I suppose this file is going to be uploaded to PyPI, so the
> file would have to be formatted at build time and include
> markers to be replaced with values taken from the distribution
> meta-data.

The metadata will always be customizable from setup.py somehow.

We won't treat those cases : if the metadata is provided in the static file,
you can get it without any further processing, if not you will get an
"UNKOWN" value
for it and you will have to grab the whole archive and run setup.py to get it.

Now the example you've shown is in my opinion not a problem : you can
create the static value for "version" that you put in your static file
with some pre-processing that
occurs when you build your release. (ala autoconf)


>
>>> - Work left to do : publish the final syntax, and do the implementation
>
> Is there a PEP for this ?

No, but if you ask for it I can write it.

>
>>> == The fate of bdist_* commands ==
>>>
>>> So the best way to handle this is to ask these communities to build
>>> their own tool and to encourage them to use Distutils as a basis for
>>> that.
>
> Rather than having external communities build their own
> tools and then basically fork distutils in order to get
> these implemented, I think it'd be better to make the
> set of distutils commands extensible via namespace packages.

I am not sure, why they would fork distutils.

Distutils is already extensible, you can configure in distutils.cfg a
list of namespace packages,
that contains commands and they'll get loaded by dist.py.


>
>>> So what is going to happen is a status-quo: no bdist_* command will be
>>> removed but no new bdist_* command will be added.
>
> I hope that comment means "no new bdist_* command will be added
> *right now*". It's well possible to create new bdist_* commands
> that don't rely on external tool chains or only on ones that
> don't change often.
>
> I'm thinking of bdist_inno (Windows installer using InnoSetup)
> and bdist_nsis (Windows installer using NSIS) here.

As I said, windows don't have any packaging system so I don't think
it's a problem to have more installers for this platform.

Regards

Tarek

--
Tarek Ziadé | http://ziade.org | オープンソースã¯ã™ã”ã„! | 开æºä¼ ä¸‡ä¸–,因有你å‚与
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


a.badger at gmail

Oct 8, 2009, 9:11 AM

Post #6 of 19 (1310 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

On Thu, Oct 08, 2009 at 01:27:57PM +0200, M.-A. Lemburg wrote:
> > Tarek Ziadé a écrit :
> >> But if PEP 376 and PEP 386 support are added in Python, we're not far
> >> from being able to provide multiple version support with
> >> the help of importlib.
>
> Before putting much work into this: do you really think that having
> multiple versions of the same package in the same Python installation
> is a good idea ?
>
I think it is a good idea.

> Examples:
> What if you have an application that uses two modules which each
> require two different versions of the same package ? Would that
> load the same package twice, causing globals used by these package
> to no work (e.g. isinstance(x, class_name) or global caches) ?
>
That's not how it should work. Look at other systems that allow for
installing multiple versions of a library -- for instance, loading dynamic
shared objects in C
* You can install multiple versions of a library in parallel
* The dynamic loader will pick the version of the library that is
appropriate from the list of available options (the program specifies the
SONAME it needs -- library name plus API version. The loader then
chooses the most recent revision that matches that API version.)
* When one binary needs multiple API versions of the library, the
application cannot start.

The last point addresses your concern -- depending on multiple, incompatible
versions of a library is prohibited. The programmer of the application
needs to make the code run with a single version of the code.

> This sounds a lot like DLL- or RPM-hell to me.
>
RPM-hell (I'm not sure if DLL hell is the same, I have the vague impression
that it is the lack of enough version specification rather than too much but
I don't know for sure). is similar but it takes place on the end-user's
system. This should take place on the programmer's system instead.
End-users are not in a position to fix things like RPM-hell. Programmers
are.

Example RPM-hell:
Application Foo requires libbar-1.x
Application Baz requires libbar-2.x

The user may either have Foo or Baz installed on their system with the
appropriate libbar but not both. They depend on the packagers and
developers of Foo and Bar to do one of the following to resolve the
situation:

* Port Foo and Baz to use the same version of libbar.
* Package libbar in such a way that libbar-1 and libbar-2 are parallel
installable on the system. Then they can install two separate packages,
libbar1-1.0 and libbar2-2.0.

Example of similar Distutils multiple version problem:
The programmer creates an application Foo that depends on python-bar-1.x. He
has recently started work on a file that imports python-baz-1.0. python-baz
depends on python-bar-2.x. The first time he tries to run his new code,
python gives him an error message that it is impossible to satisfy the
version requirements for python-bar. Depending on how the versions are
specified, the error message could be very specific and helpful:

Impossible version requirements:
bar Requires: python-baz>=2.0, < 3.0
foo.py Requires: python-baz >=1.0, < 2.0

The programmer can then discard their new code, port foo.py to
python-baz-2.x, or port python-bar to python-baz-1.x and submit a patch to
the upstream of that module. Note two things about this scenario:

1) The programmer is the person who is responsible for creating the conflict
and for resolving it. They are the proper authority for making the decision
to port to python-baz-2.x or not using python-bar. The end-user who is not
responsible is not impacted by this at all.
2) The programmer would have had to deal with this issue whether we allow
multiple versions to be installed or not. With multiple version support we
may be able to get them better error messages (depending on how the
dependency information is formatted and how completely it was specified in
the app and modules).

> I think it's much better to keep things simple and under user
> control, e.g. by encouraging use of virtualenv-like setups
> and perhaps adding better native support for these to Python.
>
> If the user finds that there's a version conflict this can
> then be resolved during environment setup instead of hoping
> for the best and waiting for application failures at run-time.
>
For the class of user that is actually a developer, it might be somewhat
true that version conflicts should be resolved by them. But for the class
of user that is an end-user, version conflicts are a totally foreign
concept. They should be dealt with by the person who is coding the
application for them.

Also note, the ability to have multiple versions makes things easier for
system packagers and provides an easy alternative to a virtualenv for
end-users.

* System packagers: virtualenv does not provide a method suitable for system
packagers. The nearest adaptation would be for the system packager to
install python packages into their own hierarchy not in the PYTHONPATH.
Then they would need to create a virtualenv-like directory that symlinks
to the packages in that directory. Then they would need to write a
wrapper script for the application that put that virtualenv-like directory
into the PYTHONPATH before any other site package directories and have
that wrapper call the real binary. This is needless complication for the
typical virtualenv install so the work is not likely to be done there and
it's incredibly hacky for the system packager so the work is not likely to
be done there.
* End users: virtualenv creates a whole environment for the application to
live in. If python understood how to use multiple versions then we'd only
need to install the versions of packages that didn't match up with what's
already on the system into the user's personal site-package directory.
Then the module loader would take care of loading the module from the
personal site-packages since it met the version requirements instead of
the system copy.

-Toshio


a.badger at gmail

Oct 8, 2009, 9:17 AM

Post #7 of 19 (1313 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

On Thu, Oct 08, 2009 at 02:52:24PM +0200, Simon Cross wrote:
> On Thu, Oct 8, 2009 at 10:31 AM, Tarek Ziadé <ziade.tarek [at] gmail> wrote:
> > = Virtualenv and the multiple version support in Distribute =
> ...
> > My opinion is that this tool exists only because Python doesn't
> > support the installation of multiple versions for the same
> > distributions.
>
Let's actually look at these reasons:

> This is not at all how I use virtualenv. For me virtualenv is a
> sandbox so that I don't have to become root whenever I need to install
> a Python package for testing purposes

This is needing to install multiple versions and use the newly installed
version for testing.

> and to allow me to hop between
> sets of installed Python packages while developing on multiple Python
> projects.

This is the ability to install multiple versions and specify different
versions for different projects you're working on.

> I also use it as a sandbox for build bots so that multiple
> bots on the same machine can each build their own projects with just
> the known dependencies installed.
>
This is the only use in the list that is virtualenv specific. The rest are
cases of needing to install multiple versions on the system.

-Toshio


solipsis at pitrou

Oct 8, 2009, 9:28 AM

Post #8 of 19 (1315 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

Toshio Kuratomi <a.badger <at> gmail.com> writes:
>
> This is needing to install multiple versions and use the newly installed
> version for testing.
[...]

What you're missing is that having separate environments has a virtue of
cleanliness, understandability and robustness that a multiple-versioned solution
doesn't have. While the technical merits are debatable I'm sure some people
definitely prefer to manage a virtualenv-based version.

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


fuzzyman at voidspace

Oct 8, 2009, 9:30 AM

Post #9 of 19 (1311 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

Toshio Kuratomi wrote:
> On Thu, Oct 08, 2009 at 02:52:24PM +0200, Simon Cross wrote:
>
>> On Thu, Oct 8, 2009 at 10:31 AM, Tarek Ziadé <ziade.tarek [at] gmail> wrote:
>>
>>> = Virtualenv and the multiple version support in Distribute =
>>>
>> ...
>>
>>> My opinion is that this tool exists only because Python doesn't
>>> support the installation of multiple versions for the same
>>> distributions.
>>>
> Let's actually look at these reasons:
>
>
>> This is not at all how I use virtualenv. For me virtualenv is a
>> sandbox so that I don't have to become root whenever I need to install
>> a Python package for testing purposes
>>
>
> This is needing to install multiple versions and use the newly installed
> version for testing.
>
>

Not really - it is wanting to install a single version of a library that
you don't want to install into your 'main' (whether that be user or
system) Python install. It is sandboxing and orthogonal to multiple
versions.

>> and to allow me to hop between
>> sets of installed Python packages while developing on multiple Python
>> projects.
>>
>
> This is the ability to install multiple versions and specify different
> versions for different projects you're working on.
>

No, it is working on multiple projects that have *different*
dependencies and being able to work in an environment that *only* has
direct dependencies installed - again sandboxed from your main Python
environment.

The fact that virtualenv allows you to have multiple different versions
of the same library installed in the different environments you create
is completely separate from the motivation that causes many people to
use it.

What virtualenv *doesn't* do (I believe) is allow you to have multiple
versions of libraries installed within a single environment and switch
between them (at least it doesn't offer anything beyond what setuptools
or pip provides).

Michael
>
>> I also use it as a sandbox for build bots so that multiple
>> bots on the same machine can each build their own projects with just
>> the known dependencies installed.
>>
>>
> This is the only use in the list that is virtualenv specific. The rest are
> cases of needing to install multiple versions on the system.
>
> -Toshio
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev [at] python
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
>


--
http://www.ironpythoninaction.com/

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


masklinn at masklinn

Oct 8, 2009, 9:35 AM

Post #10 of 19 (1312 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

On 8 Oct 2009, at 18:17 , Toshio Kuratomi wrote:
>
>> This is not at all how I use virtualenv. For me virtualenv is a
>> sandbox so that I don't have to become root whenever I need to
>> install
>> a Python package for testing purposes
>
> This is needing to install multiple versions and use the newly
> installed
> version for testing.
>
No it's not. It's keeping the python package *being tested* out of the
system's or user's site-package because it's potentially unstable or
unneeded. It provides a trivial way of *removing* the package to get
rid of it: delete the virtualenv. No trace anywhere that the package
was ever installed, no impact on the system (apart from the potential
side-effects of executing the system).

The issue here isn't "multiple installed packages", it will more than
likely be the only version of itself: note that it's a package being
tested, not an *upgrade* being tested.

The issues solved are:
* not having to become root (solved by PEP 370 if it ever lands)
* minimizing as much as possible the impact of testing the package on
the system (not solved by any other solution)

>> and to allow me to hop between
>> sets of installed Python packages while developing on multiple Python
>> projects.
>
> This is the ability to install multiple versions and specify different
> versions for different projects you're working on.
>
No, this is the ability to not needlessly clutter site-packages, keep
them clean, tight, focused; and the ability to keep a project's
environment (such as its dependencies) clear and repeatable. Nowhere
was it indicated that multiple versions were involved.

Both of those *might* imply issues of multiple versions concurrently
installed on the system, and virtualenv would incidentally solve these
issues, but these issues are *not* the core of either use case.
They're at best peripheral and potential.
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


masklinn at masklinn

Oct 8, 2009, 9:37 AM

Post #11 of 19 (1312 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

On 8 Oct 2009, at 18:17 , Toshio Kuratomi wrote:
>> This is not at all how I use virtualenv. For me virtualenv is a
>> sandbox so that I don't have to become root whenever I need to
>> install
>> a Python package for testing purposes
>
> This is needing to install multiple versions and use the newly
> installed
> version for testing.
>
No it's not. It's keeping the python package *being tested* out of the
system's or user's site-package because it's potentially unstable or
unneeded. It provides a trivial way of *removing* the package to get
rid of it: delete the virtualenv. No trace anywhere that the package
was ever installed, no impact on the system (apart from the potential
side-effects of executing the system).

The issue here isn't "multiple installed packages", it will more than
likely be the only version of itself: note that it's a package being
tested, not an *upgrade* being tested.

The issues solved are:
* not having to become root (solved by PEP 370 if it ever lands)
* minimizing as much as possible the impact of testing the package on
the system (not solved by any other solution)

>> and to allow me to hop between
>> sets of installed Python packages while developing on multiple Python
>> projects.
>
> This is the ability to install multiple versions and specify different
> versions for different projects you're working on.
>
No, this is the ability to not needlessly clutter site-packages, keep
them clean, tight, focused; and the ability to keep a project's
environment (such as its dependencies) clear and repeatable. Nowhere
was it indicated that multiple versions were involved.

Both of those *might* imply issues of multiple versions concurrently
installed on the system, and virtualenv would incidentally solve these
issues, but these issues are *not* the core of either use case.
They're at best peripheral and potential
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


kiorky at cryptelium

Oct 8, 2009, 9:56 AM

Post #12 of 19 (1309 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

Toshio Kuratomi a écrit :
> On Thu, Oct 08, 2009 at 01:27:57PM +0200, M.-A. Lemburg wrote:
>>> Tarek Ziadé a écrit :
>>>> But if PEP 376 and PEP 386 support are added in Python, we're not far
>>>> from being able to provide multiple version support with
>>>> the help of importlib.
>> Before putting much work into this: do you really think that having
>> multiple versions of the same package in the same Python installation
>> is a good idea ?
>>
> I think it is a good idea.
>
>> Examples:
>> What if you have an application that uses two modules which each
>> require two different versions of the same package ? Would that
>> load the same package twice, causing globals used by these package
>> to no work (e.g. isinstance(x, class_name) or global caches) ?
>>
> That's not how it should work. Look at other systems that allow for
> installing multiple versions of a library -- for instance, loading dynamic
> shared objects in C
> * You can install multiple versions of a library in parallel
> * The dynamic loader will pick the version of the library that is
> appropriate from the list of available options (the program specifies the
> SONAME it needs -- library name plus API version. The loader then
> chooses the most recent revision that matches that API version.)
> * When one binary needs multiple API versions of the library, the
> application cannot start.
>
> The last point addresses your concern -- depending on multiple, incompatible
> versions of a library is prohibited. The programmer of the application
> needs to make the code run with a single version of the code.
>
>> This sounds a lot like DLL- or RPM-hell to me.
>>
> RPM-hell (I'm not sure if DLL hell is the same, I have the vague impression
> that it is the lack of enough version specification rather than too much but
> I don't know for sure). is similar but it takes place on the end-user's
> system. This should take place on the programmer's system instead.
> End-users are not in a position to fix things like RPM-hell. Programmers
> are.
>
> Example RPM-hell:
> Application Foo requires libbar-1.x
> Application Baz requires libbar-2.x
>
> The user may either have Foo or Baz installed on their system with the
> appropriate libbar but not both. They depend on the packagers and
> developers of Foo and Bar to do one of the following to resolve the
> situation:
>
> * Port Foo and Baz to use the same version of libbar.
> * Package libbar in such a way that libbar-1 and libbar-2 are parallel
> installable on the system. Then they can install two separate packages,
> libbar1-1.0 and libbar2-2.0.
>
> Example of similar Distutils multiple version problem:
> The programmer creates an application Foo that depends on python-bar-1.x. He
> has recently started work on a file that imports python-baz-1.0. python-baz
> depends on python-bar-2.x. The first time he tries to run his new code,
> python gives him an error message that it is impossible to satisfy the
> version requirements for python-bar. Depending on how the versions are
> specified, the error message could be very specific and helpful:
>
> Impossible version requirements:
> bar Requires: python-baz>=2.0, < 3.0
> foo.py Requires: python-baz >=1.0, < 2.0
>
> The programmer can then discard their new code, port foo.py to
> python-baz-2.x, or port python-bar to python-baz-1.x and submit a patch to
> the upstream of that module. Note two things about this scenario:
>
> 1) The programmer is the person who is responsible for creating the conflict
> and for resolving it. They are the proper authority for making the decision
> to port to python-baz-2.x or not using python-bar. The end-user who is not
> responsible is not impacted by this at all.
> 2) The programmer would have had to deal with this issue whether we allow
> multiple versions to be installed or not. With multiple version support we
> may be able to get them better error messages (depending on how the
> dependency information is formatted and how completely it was specified in
> the app and modules).
>
>> I think it's much better to keep things simple and under user
>> control, e.g. by encouraging use of virtualenv-like setups
>> and perhaps adding better native support for these to Python.
>>
>> If the user finds that there's a version conflict this can
>> then be resolved during environment setup instead of hoping
>> for the best and waiting for application failures at run-time.
>>
> For the class of user that is actually a developer, it might be somewhat
> true that version conflicts should be resolved by them. But for the class
> of user that is an end-user, version conflicts are a totally foreign
> concept. They should be dealt with by the person who is coding the
> application for them.
>
> Also note, the ability to have multiple versions makes things easier for
> system packagers and provides an easy alternative to a virtualenv for
> end-users.
>
> * System packagers: virtualenv does not provide a method suitable for system

Yes, there is no doubt virtualenv is useless for system packagers but:

* System and applications deployment have not to be tied.
It s up to the user to install things system wide or to use locally isolation
technics. Virtualenv is one of those.
As a conclusion, there are not very much problem for system packagers as if
their users have specific needs, they will do something Outside the system.
If not, they use their global python with packages installed in that global one.

> packagers. The nearest adaptation would be for the system packager to
> install python packages into their own hierarchy not in the PYTHONPATH.
> Then they would need to create a virtualenv-like directory that symlinks
> to the packages in that directory. Then they would need to write a
> wrapper script for the application that put that virtualenv-like directory
> into the PYTHONPATH before any other site package directories and have
> that wrapper call the real binary. This is needless complication for the
> typical virtualenv install so the work is not likely to be done there and
> it's incredibly hacky for the system packager so the work is not likely to
> be done there.
> * End users: virtualenv creates a whole environment for the application to
> live in. If python understood how to use multiple versions then we'd only
> need to install the versions of packages that didn't match up with what's
> already on the system into the user's personal site-package directory.
> Then the module loader would take care of loading the module from the
> personal site-packages since it met the version requirements instead of
> the system copy.
>

I dont want to have interaction between my different hosted projects, isolation
is the only thing i want. As many other people there already.
I do not want at all to have to deal with multiple version picking system and
debug an application at 2:00am because of that.

> -Toshio
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev [at] python
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/kiorky%40cryptelium.net

--
--
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF
Attachments: signature.asc (0.25 KB)


kiorky at cryptelium

Oct 8, 2009, 10:05 AM

Post #13 of 19 (1313 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

Toshio Kuratomi a écrit :
> On Thu, Oct 08, 2009 at 01:27:57PM +0200, M.-A. Lemburg wrote:
>>> Tarek Ziadé a écrit :
>>>> But if PEP 376 and PEP 386 support are added in Python, we're not far
>>>> from being able to provide multiple version support with
>>>> the help of importlib.
>> Before putting much work into this: do you really think that having
>> multiple versions of the same package in the same Python installation
>> is a good idea ?
>>
> I think it is a good idea.
>
>> Examples:
>> What if you have an application that uses two modules which each
>> require two different versions of the same package ? Would that
>> load the same package twice, causing globals used by these package
>> to no work (e.g. isinstance(x, class_name) or global caches) ?
>>
> That's not how it should work. Look at other systems that allow for
> installing multiple versions of a library -- for instance, loading dynamic
> shared objects in C
> * You can install multiple versions of a library in parallel
> * The dynamic loader will pick the version of the library that is
> appropriate from the list of available options (the program specifies the
> SONAME it needs -- library name plus API version. The loader then
> chooses the most recent revision that matches that API version.)
> * When one binary needs multiple API versions of the library, the
> application cannot start.
>
> The last point addresses your concern -- depending on multiple, incompatible
> versions of a library is prohibited. The programmer of the application
> needs to make the code run with a single version of the code.
>
>> This sounds a lot like DLL- or RPM-hell to me.
>>
> RPM-hell (I'm not sure if DLL hell is the same, I have the vague impression
> that it is the lack of enough version specification rather than too much but
> I don't know for sure). is similar but it takes place on the end-user's
> system. This should take place on the programmer's system instead.
> End-users are not in a position to fix things like RPM-hell. Programmers
> are.
>
> Example RPM-hell:
> Application Foo requires libbar-1.x
> Application Baz requires libbar-2.x
>
> The user may either have Foo or Baz installed on their system with the
> appropriate libbar but not both. They depend on the packagers and
> developers of Foo and Bar to do one of the following to resolve the
> situation:
>
> * Port Foo and Baz to use the same version of libbar.
> * Package libbar in such a way that libbar-1 and libbar-2 are parallel
> installable on the system. Then they can install two separate packages,
> libbar1-1.0 and libbar2-2.0.
>
> Example of similar Distutils multiple version problem:
> The programmer creates an application Foo that depends on python-bar-1.x. He
> has recently started work on a file that imports python-baz-1.0. python-baz
> depends on python-bar-2.x. The first time he tries to run his new code,
> python gives him an error message that it is impossible to satisfy the
> version requirements for python-bar. Depending on how the versions are
> specified, the error message could be very specific and helpful:
>
> Impossible version requirements:
> bar Requires: python-baz>=2.0, < 3.0
> foo.py Requires: python-baz >=1.0, < 2.0
>
> The programmer can then discard their new code, port foo.py to
> python-baz-2.x, or port python-bar to python-baz-1.x and submit a patch to
> the upstream of that module. Note two things about this scenario:
>
> 1) The programmer is the person who is responsible for creating the conflict
> and for resolving it. They are the proper authority for making the decision
> to port to python-baz-2.x or not using python-bar. The end-user who is not
> responsible is not impacted by this at all.
> 2) The programmer would have had to deal with this issue whether we allow
> multiple versions to be installed or not. With multiple version support we
> may be able to get them better error messages (depending on how the
> dependency information is formatted and how completely it was specified in
> the app and modules).
>
>> I think it's much better to keep things simple and under user
>> control, e.g. by encouraging use of virtualenv-like setups
>> and perhaps adding better native support for these to Python.
>>
>> If the user finds that there's a version conflict this can
>> then be resolved during environment setup instead of hoping
>> for the best and waiting for application failures at run-time.
>>
> For the class of user that is actually a developer, it might be somewhat
> true that version conflicts should be resolved by them. But for the class
> of user that is an end-user, version conflicts are a totally foreign
> concept. They should be dealt with by the person who is coding the
> application for them.
>
> Also note, the ability to have multiple versions makes things easier for
> system packagers and provides an easy alternative to a virtualenv for
> end-users.
>
> * System packagers: virtualenv does not provide a method suitable for system

Yes, there is no doubt virtualenv is useless for system packagers but:

* System and applications deployment have not to be tied.
It s up to the user to install things system wide or to use locally isolation
technics. Virtualenv is one of those.
As a conclusion, there are not very much problem for system packagers as if
their users have specific needs, they will do something Outside the system.
If not, they use their global python with packages installed in that global one.

> packagers. The nearest adaptation would be for the system packager to
> install python packages into their own hierarchy not in the PYTHONPATH.
> Then they would need to create a virtualenv-like directory that symlinks
> to the packages in that directory. Then they would need to write a
> wrapper script for the application that put that virtualenv-like directory
> into the PYTHONPATH before any other site package directories and have
> that wrapper call the real binary. This is needless complication for the
> typical virtualenv install so the work is not likely to be done there and
> it's incredibly hacky for the system packager so the work is not likely to
> be done there.
> * End users: virtualenv creates a whole environment for the application to
> live in. If python understood how to use multiple versions then we'd only
> need to install the versions of packages that didn't match up with what's
> already on the system into the user's personal site-package directory.
> Then the module loader would take care of loading the module from the
> personal site-packages since it met the version requirements instead of
> the system copy.
>

I dont want to have interaction between my different hosted projects, isolation
is the only thing i want. As many other people there already.
I do not want at all to have to deal with multiple version picking system and
debug an application at 2:00am because of that.

> -Toshio
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev [at] python
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/kiorky%40cryptelium.net

--
--
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF
Attachments: signature.asc (0.26 KB)
  signature.asc (0.25 KB)


cournape at gmail

Oct 8, 2009, 10:22 AM

Post #14 of 19 (1308 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

On Fri, Oct 9, 2009 at 1:35 AM, Masklinn <masklinn [at] masklinn> wrote:
> On 8 Oct 2009, at 18:17 , Toshio Kuratomi wrote:
>>
>>> This is not at all how I use virtualenv. For me virtualenv is a
>>> sandbox so that I don't have to become root whenever I need to install
>>> a Python package for testing purposes
>>
>> This is needing to install multiple versions and use the newly installed
>> version for testing.
>>
> No it's not. It's keeping the python package *being tested* out of the
> system's or user's site-package because it's potentially unstable or
> unneeded. It provides a trivial way of *removing* the package to get rid of
> it: delete the virtualenv. No trace anywhere that the package was ever
> installed, no impact on the system  (apart from the potential side-effects
> of executing the system).
>
> The issue here isn't "multiple installed packages", it will more than likely
> be the only version of itself: note that it's a package being tested, not an
> *upgrade* being tested.
>
> The issues solved are:
> * not having to become root (solved by PEP 370 if it ever lands)
> * minimizing as much as possible the impact of testing the package on the
> system (not solved by any other solution)

This is not true - stow solves the problem in a more general way (in
the sense that it is not restricted to python), at least on platforms
which support softlink. The only inconvenience of stow compared to
virtual env is namespace packages, but that's because of a design flaw
in namespace package (as implemented in setuptools, and hopefully
fixed in the upcoming namespace package PEP).

Virtualenv provides a possible solution to some deployment problems,
and is useful in those cases, but it is too specialized to be included
in python itself IMO.

cheers,

David
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


a.badger at gmail

Oct 8, 2009, 11:35 AM

Post #15 of 19 (1303 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

On Thu, Oct 08, 2009 at 06:56:19PM +0200, kiorky wrote:
>
>
> Toshio Kuratomi a écrit :
> >
> > Also note, the ability to have multiple versions makes things easier for
> > system packagers and provides an easy alternative to a virtualenv for
> > end-users.
> >
> > * System packagers: virtualenv does not provide a method suitable for system
>
> Yes, there is no doubt virtualenv is useless for system packagers but:
>
> * System and applications deployment have not to be tied.
> It s up to the user to install things system wide or to use locally isolation
> technics. Virtualenv is one of those.
> As a conclusion, there are not very much problem for system packagers as if
> their users have specific needs, they will do something Outside the system.
> If not, they use their global python with packages installed in that global one.
>
This misses the point. If there's two pieces of software to be deployed
via system packages and they use two different versions of a module, it's
currently not very easy to do this. I do it with setuptools curently even
with all its warts. Having a way to do this from within the stdlib that
tied directly into the import mechanism would make for a much cleaner
situation.

In other words, the suggestion that there is no need for a method to install
multiple versions of a module because virtualenv is a better solution is
bogus. virtualenv is a better solution for creating isolated environments.
It is not a solution for all of the cases that being able to install
multiple versions of a library would be.

-Toshio


a.badger at gmail

Oct 8, 2009, 11:40 AM

Post #16 of 19 (1308 views)
Permalink
Re: Distutils and Distribute roadmap (and some?words?on Virtualenv, Pip) [In reply to]

On Thu, Oct 08, 2009 at 04:28:52PM +0000, Antoine Pitrou wrote:
> Toshio Kuratomi <a.badger <at> gmail.com> writes:
> >
> > This is needing to install multiple versions and use the newly installed
> > version for testing.
> [...]
>
> What you're missing is that having separate environments has a virtue of
> cleanliness, understandability and robustness that a multiple-versioned solution
> doesn't have. While the technical merits are debatable I'm sure some people
> definitely prefer to manage a virtualenv-based version.
>
I'm not missing it. I'm only saying that the precise requirement that is
being stated is not sandboxing (that was listed later). It's being able to
use a newly installed library for testing. The essential element of that is
being able to install a new version of the library and use that instead of
the sytem installed version. sandboxing may be how someone wants to do this
but it isn't essential to be able to do this.

-Toshio


a.badger at gmail

Oct 8, 2009, 11:52 AM

Post #17 of 19 (1306 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

On Thu, Oct 08, 2009 at 05:30:00PM +0100, Michael Foord wrote:
> Toshio Kuratomi wrote:
>> On Thu, Oct 08, 2009 at 02:52:24PM +0200, Simon Cross wrote:
>>
>>> On Thu, Oct 8, 2009 at 10:31 AM, Tarek Ziadé <ziade.tarek [at] gmail> wrote:
>>>
>>>> = Virtualenv and the multiple version support in Distribute =
>>>>
>>> ...
>>>
>>>> My opinion is that this tool exists only because Python doesn't
>>>> support the installation of multiple versions for the same
>>>> distributions.
>>>>
>> Let's actually look at these reasons:
>>
>>
>>> This is not at all how I use virtualenv. For me virtualenv is a
>>> sandbox so that I don't have to become root whenever I need to install
>>> a Python package for testing purposes
>>>
>>
>> This is needing to install multiple versions and use the newly installed
>> version for testing.
>>
>>
>
> Not really - it is wanting to install a single version of a library that
> you don't want to install into your 'main' (whether that be user or
> system) Python install. It is sandboxing and orthogonal to multiple
> versions.
>
What I'm replying to is specifically the need to: "become root whenever I
need to install a Python package for testing purposes" That doesn't require
sandboxing at all. Can you use sandboxing to do this? Yes. But that is
separate to being able to install a non-system version of a library and be
able to test it.

My quoting of that phrase could have been better -- I missed the reference
to sandboxing since it is in a separate clause of the sentence from what I
was responding to.

>>>
>>> and to allow me to hop between
>>> sets of installed Python packages while developing on multiple Python
>>> projects.
>>>
>>
>> This is the ability to install multiple versions and specify different
>> versions for different projects you're working on.
>>
>
> No, it is working on multiple projects that have *different*
> dependencies and being able to work in an environment that *only* has
> direct dependencies installed - again sandboxed from your main Python
> environment.
>
No. Here what is written is: "allow me to hop between sets of installed Python
packages while developing on multiple Python projects."

There's nothing about *only* having direct dependencies installed. That's a
separate requirement than what was written.

> The fact that virtualenv allows you to have multiple different versions
> of the same library installed in the different environments you create
> is completely separate from the motivation that causes many people to
> use it.
>
Precisely! We see 100% eye-to-eye here. My reply is just trying to say
that the ideas of
* testing a locally installed, conflicting version of a library
* running multiple projects with different, conflicting version requirements

are completely satisfiable without sandboxing. Virtualenv is a sandboxing
tool. It can be used to perform these tasks. But it isn't necessary.
Having sandboxing is an additional feature on top of the base requirements
to perform the task.

> What virtualenv *doesn't* do (I believe) is allow you to have multiple
> versions of libraries installed within a single environment and switch
> between them (at least it doesn't offer anything beyond what setuptools
> or pip provides).
>
Yep. Which makes virtualenv unsuitable for certain other problem spaces
where sandboxing is inappropriate.

-Toshio


solipsis at pitrou

Oct 9, 2009, 3:43 AM

Post #18 of 19 (1287 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

Ian Bicking <ianb <at> colorstudy.com> writes:
>
> Someone mentioned that easy_install provided some things pip didn't;
> outside of multi-versioned installs (which I'm not very enthusiastic
> about) I'm not sure what this is?

http://pip.openplans.org/#differences-from-easy-install

If it's obsolete the website should be updated...


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


p.f.moore at gmail

Oct 9, 2009, 5:32 AM

Post #19 of 19 (1285 views)
Permalink
Re: Distutils and Distribute roadmap (and some words on Virtualenv, Pip) [In reply to]

2009/10/9 Antoine Pitrou <solipsis [at] pitrou>:
> Ian Bicking <ianb <at> colorstudy.com> writes:
>>
>> Someone mentioned that easy_install provided some things pip didn't;
>> outside of multi-versioned installs (which I'm not very enthusiastic
>> about) I'm not sure what this is?
>
> http://pip.openplans.org/#differences-from-easy-install
>
> If it's obsolete the website should be updated...

Specifically, combine "only installs from source" with "might not work
on Windows" and the result is pretty certainly unusable for C
extensions on Windows. You can pretty much guarantee that the average
user on Windows won't have a C compiler[1], and even if they do, they
won't be able to carefully line up all the 3rd party C libraries
needed to build some extensions.

Binary packages are essential on Windows.

Paul.

[1] Heck, some extensions only build with mingw, others only build
with MSVC. You need *two* compilers :-(
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.