Re: [Distutils] What is the status of extensions package ? it's the future of packaging / distutils2 entry points ?

2011-04-22 Thread Alexis Métaireau

On 22/04/2011 00:00, Stéphane Klein wrote:

Hi,

I would like to know what is the status of extensions package
(http://pypi.python.org/pypi/extensions/0.4) ?

It's the future of entry points of packaging / distutils2 ?


Hi,

The extensions package can be used in replacement to setuptools entry 
points.


However, it is not related to packaging / distutils2 and will not be in 
the future, as there is no reason why this kind of feature would stand 
with packaging related code.


--
Alexis
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] dependencies, pip and non-PyPI-hosted packages

2011-04-22 Thread Ernesto Posse
Thanks. I have another question. Now that I'm using distribute, pip
handles the requirements correctly, but if I install with:

python setup.py install

the dependencies are not installed. This is a bit perplexing.

I am trying the scenario where the user has a plain Python
installation with no pip, distribute or setuptools (hence installing
the old fashioned way).

My setup.py looks like this:

# Begin of setup.py

from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages

setup(..., 
install_requires=['project1'],...,dependency_links=['http://my.host.org/repository/'],...)

# End of setup.py

and I took care of including distribute_setup.py in MANIFEST.in, so it
is part of the .tar.gz.

When attempting to install, I get this

$ sudo python setup.py install
Downloading 
http://pypi.python.org/packages/source/d/distribute/distribute-0.6.15.tar.gz
Extracting in /tmp/tmp4VDb5n
Now working in /tmp/tmp4VDb5n/distribute-0.6.15
Building a Distribute egg in /home/eposse/Downloads/project2-0.1dev
/home/eposse/Downloads/proyecto3-0.1dev/distribute-0.6.15-py2.6.egg
/usr/lib/python2.6/distutils/dist.py:266: UserWarning: Unknown
distribution option: 'install_requires'
  warnings.warn(msg)
...

And the dependencies are ignored.

I don't understand: I explicitly called use_setuptools in my setup,
and as can be seen, distribute is automatically downloaded (albeit
installed in a temporary directory), and imported setup from
setuptools, but it looks like it is calling the plain distutils setup
!?

Why is it not calling the distribute/setuptools setup?

Is there any way around this?

Thanks

PS: since 'requires' and 'provides' are not used in any tool, why are
they in the official documentation?


On Tue, Apr 19, 2011 at 5:18 PM, Carl Meyer c...@oddbird.net wrote:
 On 04/19/2011 04:07 PM, Ernesto Posse wrote:
 1) using distribute and

   setup(..., install_requires=['project1'],...,
 dependency_links=['http://my.host.org/repository/'],...)

 installs as expected both project1 and project2, but

   pip uninstall project2

 does not uninstall project1. This is quite disappointing, as a user
 may be unaware of dependencies automatically installed, and thus, the
 uninstall leaves behind something that was installed with the bundle.
 I imagine that the idea is that the user may install some other
 package that depends on 'project1' and pip takes the conservative
 approach (is that the case?) but I would have expected for pip or
 distribute or setuptools or distutils to keep some dependency
 reference counter. Does any of these tools have something like that?
 or is it going to be addressed in distutils2?

 No, there's no current Python packaging tool I know of that keeps a
 dependency reference counter and automatically uninstalls orphaned
 dependencies. The new standard installation format (defined in PEP 376
 and implemented in distutils2) does record whether a package was
 installed by explicit user request or as a dependency; combined with
 checking dependencies of all other installed packages, this will make it
 possible for an uninstaller to implement automatic (or prompted)
 dependency uninstalls.

 2) if install_requires is missing a dependency (project1), the package
 gets installed without that dependency, but if I add a dependency and
 the user attempts an install (project2) with the updated setup.py
 (listing the new dependency) pip will say that the package (project2)
 is already installed and won't attempt to install the dependencies. Is
 this correct? If so, is there a way to tell pip to install project2's
 dependencies?

 With a real package release, the setup.py metadata should never change
 without a version number change. In which case, if you specify the new
 version explicitly or use --upgrade, the previous version will be
 uninstalled and the new one installed in its place, with dependencies.
 (Actually, if you specify --upgrade and you already have the most recent
 version installed, it will still uninstall and reinstall it; but this is
 actually considered a bug.)

 Carl
 ___
 Distutils-SIG maillist  -  Distutils-SIG@python.org
 http://mail.python.org/mailman/listinfo/distutils-sig




-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] dependencies, pip and non-PyPI-hosted packages

2011-04-22 Thread Fred Drake
On Fri, Apr 22, 2011 at 12:34 PM, Ernesto Posse epo...@gmail.com wrote:
 PS: since 'requires' and 'provides' are not used in any tool, why are
 they in the official documentation?

We answered the chicken-and-egg problem incorrectly.

Ignore those.


  -Fred

-- 
Fred L. Drake, Jr.    fdrake at acm.org
Give me the luxuries of life and I will willingly do without the necessities.
   --Frank Lloyd Wright
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] dependencies, pip and non-PyPI-hosted packages

2011-04-22 Thread Carl Meyer
Hi Ernesto,

On 04/22/2011 11:34 AM, Ernesto Posse wrote:
 Thanks. I have another question. Now that I'm using distribute, pip
 handles the requirements correctly, but if I install with:
 
 python setup.py install
 
 the dependencies are not installed. This is a bit perplexing.

This is just how it is. python setup.py install installs the package
in question. Installer tools like pip or easy_install handle
dependencies. If you want dependencies handled automatically, your users
will need to use pip or easy_install.

 I don't understand: I explicitly called use_setuptools in my setup,
 and as can be seen, distribute is automatically downloaded (albeit
 installed in a temporary directory), and imported setup from
 setuptools, but it looks like it is calling the plain distutils setup
 !?
 
 Why is it not calling the distribute/setuptools setup?

No, it is calling the distribute setup. If you look at how your package
is installed, you'll find it in an egg - that's a sure sign of
setuptools/distribute. It's just that python setup.py install does not
handle dependencies, even with setuptools/distribute.

 Is there any way around this?

Not that I know of.

Carl
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] dependencies, pip and non-PyPI-hosted packages

2011-04-22 Thread Jim Fulton
On Fri, Apr 22, 2011 at 5:54 PM, Carl Meyer c...@oddbird.net wrote:
 Hi Ernesto,

 On 04/22/2011 11:34 AM, Ernesto Posse wrote:
 Thanks. I have another question. Now that I'm using distribute, pip
 handles the requirements correctly, but if I install with:

 python setup.py install

 the dependencies are not installed. This is a bit perplexing.

 This is just how it is. python setup.py install installs the package
 in question. Installer tools like pip or easy_install handle
 dependencies. If you want dependencies handled automatically, your users
 will need to use pip or easy_install.

Or zc.buildout. :)

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] dependencies, pip and non-PyPI-hosted packages

2011-04-22 Thread Ernesto Posse
On Fri, Apr 22, 2011 at 5:54 PM, Carl Meyer c...@oddbird.net wrote:
 I don't understand: I explicitly called use_setuptools in my setup,
 and as can be seen, distribute is automatically downloaded (albeit
 installed in a temporary directory), and imported setup from
 setuptools, but it looks like it is calling the plain distutils setup
 !?

 Why is it not calling the distribute/setuptools setup?

 No, it is calling the distribute setup. If you look at how your package
 is installed, you'll find it in an egg - that's a sure sign of
 setuptools/distribute. It's just that python setup.py install does not
 handle dependencies, even with setuptools/distribute.

Hmm... OK, I guess I assumed that distribute was extending the
standard distutils install command to install dependencies, rather
than pip being responsible. So essentially to take advantage of
distribute one must use pip?

Anyway, is automatic dependency installation going to be a standard
feature of distutils2?



-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] dependencies, pip and non-PyPI-hosted packages

2011-04-22 Thread Carl Meyer
On 04/22/2011 06:09 PM, Ernesto Posse wrote:
 Hmm... OK, I guess I assumed that distribute was extending the
 standard distutils install command to install dependencies, rather
 than pip being responsible. So essentially to take advantage of
 distribute one must use pip?

It extends distutils to do a number of different things (like install
actual metadata, for instance), and it provides the metadata related to
dependencies - but yes, it's easy_install or pip or zc.buildout (thanks
Jim!) that actually makes use of the dependency info to automatically
install things.

 Anyway, is automatic dependency installation going to be a standard
 feature of distutils2?

Yes, d2 will come with a pysetup command similar to pip/easy_install
that will handle dependencies.

Carl
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig