Ubuntu python version
Matthias Klose
m at klose.in-berlin.de
Thu Feb 3 03:40:51 CST 2005
On Do, 2005-02-03 at 10:30 +0100, Vincenzo Di Massa wrote:
> Alle 09:23, giovedì 03 febbraio 2005, Matthias Klose ha scritto:
> > On Do, 2005-02-03 at 02:19 +0100, Vincenzo Di Massa wrote:
> > > Alle 19:15, mercoledì 02 febbraio 2005, Matt Zimmerman ha scritto:
> > > > On Wed, Feb 02, 2005 at 11:36:53AM +0100, Vincenzo Di Massa wrote:
> > > > > Please tell me if I understand how it works.
> > > > >
> > > > > If I want to develop a package MyPackage wihch depends on
> > > > > AnotherPackage and there are packagesAnotherPackage AnotherPackage1.0
> > > > > AnotherPackage2.0: - if I want to depend on >=1 I just depend on
> > > > > AnotherPackage - if I want to dependo on <=1 I must depend on
> > > > > AnotherPackage1.0
> > > >
> > > > The "python2.3" package provides /usr/bin/python2.3. If your package
> > > > uses #!/usr/bin/python2.3, you should depend on this package.
> > > >
> > > > The "python2.4" package provides /usr/bin/python2.4. If your package
> > > > uses #!/usr/bin/python2.4, you should depend on this package.
> > > >
> > > > The "python" package provides /usr/bin/python. If your package uses
> > > > #!/usr/bin/python, you should depend on this package.
> > >
> > > Are you sure? The current python package (wich is a dependency package)
> > > does not (and should not IMHO) provide /usr/bin/python.
> > >
> > > #dpkg -L python | grep bin
> > >
> > > /usr/bin
> > > /usr/bin/pydoc
> > > /usr/bin/pygettext
> > > /usr/bin/pdb
> >
> > it's in python-minimal, which python depends on.
> >
> > > > In all of these cases, you may use inequalities to declare a dependency
> > > > on particular versions of these packages. If your package contains a
> > > > #!/usr/bin/python program which only works with python 2.4 or later,
> > > > you could use Depends: python (>= 2.4). If your package contains a
> > > > #!/usr/bin/python2.3 program which only works with python 2.3.3 or
> > > > later, you could use Depends: python2.3 (>= 2.3.3).
> > > >
> > > > I hope this clarifies things for you.
> > >
> > > Just one more question: what if my program does *not* work with python
> > > 2.4 because it requires python2.3 ?
> > > There are two ways:
> > > 1) depend on python2.3
> > > 2) depend on python (<=2.3) or (=2.3)
> > >
> > > IMHO 2) is the wrong way because, to satisfy this dependency, you can't
> > > upgrade python. You can install python2.4, but python (and packages
> > > requiring newer versions of python) can't be installed.
> > >
> > > If you go with 1) there should be no problem: I just need to change
> > > references to /usr/bin/python to /usr/bin/python2.3.
> >
> > yes, 1) is the way to go.
> >
> > > > > There should be a rule preventing confusion so that packages that
> > > > > just want mysql or python must not depend on version number with <=,
> > > > > if they want to depend on something with <= they should depend on the
> > > > > right vesion.
> > > >
> > > > In the case of Python programs, dependencies with <= or << don't seem
> > > > to make much sense to me. Matthias, can you explain the reasons why
> > > > many packages are made this way?
> >
> > consider a package foo, depending on a package python-foo, which
> > contains /usr/lib/python2.3/site-packages/foo.py. either python-foo or
> > foo needs to have the (<< 2.4) dependency, or else foo will break. As it
> > looks it's sufficient if python-foo has this dependency.
>
> I don't understand this point. Why should it depend on python (<< 2.4) and not
> on python2.3? What is the difference from what we explained above?
Depending on python2.3 is perfectly ok. But many people prefer to type
python instead of python2.3.
More information about the ubuntu-devel
mailing list