Can't find Python Library packages in Ubuntu (Debian)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't find Python Library packages in Ubuntu (Debian)

Jerzy Jalocha N
I'm new in this list (and to Python), so I'd like to start saying
hello to everyone first. I am really enjoying this new language!

I am trying to use the standard tests (like test_list.py or
test_dict.py) from the standard library (Python2.5), but they aren't
available on a standard Ubuntu Hardy or Ibex installation. Searching
in the official download, I found a rich test structure under
'Lib/test/', but in my installation, this directory doesn't contain
much. The dpkg-file script didn't find any packages for these specific
files either. I looked manually in any 'python-' package that seemed
reasonable, with no success, and Google didn't help this time.

So, the first question is: How do I install the complete Python test
framework under Ubuntu (Debian)?

Since I spend long times in a remote area without network connection,
I usually try to set-up everything I need (and might eventually need)
on my computer in advance, in order to avoid unpleasant surprises.
Thus, I would really try to make sure, I have a complete Python
installed on my notebook. But I couldn't find out for sure what parts
are missing in a standard Ubuntu installation, and what needs to be
added manually.

So, my second question: What (meta?-)package(s) do I have to install
under Ubuntu (Debian) in order to get a full (as in the official
release) Python installation?

Thank you in advance!

Jerzy
--
http://mail.python.org/mailman/listinfo/python-list
Reply | Threaded
Open this post in threaded view
|

Re: Can't find Python Library packages in Ubuntu (Debian)

Diez B. Roggisch-2
Jerzy Jalocha N wrote:

> I'm new in this list (and to Python), so I'd like to start saying
> hello to everyone first. I am really enjoying this new language!
>
> I am trying to use the standard tests (like test_list.py or
> test_dict.py) from the standard library (Python2.5), but they aren't
> available on a standard Ubuntu Hardy or Ibex installation. Searching
> in the official download, I found a rich test structure under
> 'Lib/test/', but in my installation, this directory doesn't contain
> much. The dpkg-file script didn't find any packages for these specific
> files either. I looked manually in any 'python-' package that seemed
> reasonable, with no success, and Google didn't help this time.
>
> So, the first question is: How do I install the complete Python test
> framework under Ubuntu (Debian)?
>
> Since I spend long times in a remote area without network connection,
> I usually try to set-up everything I need (and might eventually need)
> on my computer in advance, in order to avoid unpleasant surprises.
> Thus, I would really try to make sure, I have a complete Python
> installed on my notebook. But I couldn't find out for sure what parts
> are missing in a standard Ubuntu installation, and what needs to be
> added manually.
>
> So, my second question: What (meta?-)package(s) do I have to install
> under Ubuntu (Debian) in order to get a full (as in the official
> release) Python installation?

The one thing you will definitely need is the python-dev-package. It will
contain things such as headers and distutils that are needed to build and
install 3rd-party-packages.

I don't have the slightest idea where the tests are - but you can of course
always install the source package :)

Diez
--
http://mail.python.org/mailman/listinfo/python-list
Reply | Threaded
Open this post in threaded view
|

Re: Can't find Python Library packages in Ubuntu (Debian)

Jerzy Jalocha N
In reply to this post by Jerzy Jalocha N
>> So, the first question is: How do I install the complete Python test
>> framework under Ubuntu (Debian)?
>>
>> So, my second question: What (meta?-)package(s) do I have to install
>> under Ubuntu (Debian) in order to get a full (as in the official
>> release) Python installation?

> I don't have the slightest idea where the tests are - but you can of course
> always install the source package :)

I think, I will take the chance, and install Python 2.6 which isn't
available as an
Ubuntu package yet. :)

And my third question could be: Do all Python developers that work with Debian
(or derivations) have to compile Python?

> The one thing you will definitely need is the python-dev-package. It will
> contain things such as headers and distutils that are needed to build and
> install 3rd-party-packages.

Thanks for your comments, Diez!

Jerzy
--
http://mail.python.org/mailman/listinfo/python-list
Reply | Threaded
Open this post in threaded view
|

Re: Can't find Python Library packages in Ubuntu (Debian)

David Cournapeau
On Fri, Nov 21, 2008 at 9:24 PM, Jerzy Jalocha N <[hidden email]> wrote:

>
> And my third question could be: Do all Python developers that work with Debian
> (or derivations) have to compile Python?

I think most people using python as a development tool use the version
available in their distribution. Personally, I mostly use the stock
python of Ubuntu. Although building python itself is not difficult on
the typical linux box, keep in mind that you will almost certainly
need to re-build all the packages you need. Tt is not easy if at all
possible to use extensions from one python interpreter to the other,
in particular for packages which contain C code (things like pygtk,
pyqt come to mind). If you want to use python 2.6, you don't have a
choice, though, since it is not available on Ubuntu yet as you said.

David
--
http://mail.python.org/mailman/listinfo/python-list
Reply | Threaded
Open this post in threaded view
|

Re: Can't find Python Library packages in Ubuntu (Debian)

Jerzy Jalocha N
On Fri, Nov 21, 2008 at 9:37 AM, David Cournapeau <[hidden email]> wrote:
> I think most people using python as a development tool use the version
> available in their distribution. Personally, I mostly use the stock
> python of Ubuntu. Although building python itself is not difficult on
> the typical linux box, keep in mind that you will almost certainly
> need to re-build all the packages you need. Tt is not easy if at all
> possible to use extensions from one python interpreter to the other,
> in particular for packages which contain C code (things like pygtk,
> pyqt come to mind). If you want to use python 2.6, you don't have a
> choice, though, since it is not available on Ubuntu yet as you said.

David, I agree with you, that compiling all the additional packages could
become quite difficult, especially for an unexperienced guy like me.
Thus, I will keep using the stock install for everyday use, and use my
custom installation (standard python only, without additional packages)
for the missing unit-tests, and for testing upcoming 2.6/3.0 compatibility.

I will try to contact whoever is responsible for the packaging of Python
in Ubuntu (or Debian), and ask them if they are willing to support the
_complete_ Python release.

Thanks,
Jerzy
--
http://mail.python.org/mailman/listinfo/python-list
Reply | Threaded
Open this post in threaded view
|

Re: Can't find Python Library packages in Ubuntu (Debian)

Paul Boddie
In reply to this post by David Cournapeau
On 24 Nov, 12:42, "Jerzy Jalocha N" <[hidden email]> wrote:
>
> I will try to contact whoever is responsible for the packaging of Python
> in Ubuntu (or Debian), and ask them if they are willing to support the
> _complete_ Python release.

They may already do so, but I'd argue that they could document the
packages which provide the complete release a bit better if these are
not already mentioned in /usr/share/doc/python/README.Debian or some
similar file. By looking at the documentation for the Debian stable
source package, I did manage to find a list of generated packages:

http://packages.debian.org/source/etch/python-defaults

Perhaps one of these contains the test files. Although such files are
arguably only of use to people building Python, and such people would
therefore obtain the source package in order to perform the build
process, there could be some benefit in having a package which
provides these files separately. For example, one may wish to verify
the behaviour of an installed version or to test aspects of another
implementation. I don't see a problem with you (or someone else)
filing a bug about this, but then I'm not too familiar with the
packaging policies of Debian with respect to Python.

Paul
--
http://mail.python.org/mailman/listinfo/python-list
Reply | Threaded
Open this post in threaded view
|

Re: Can't find Python Library packages in Ubuntu (Debian)

Scott David Daniels
In reply to this post by Jerzy Jalocha N
Jerzy Jalocha N wrote:
> I'm new in this list (and to Python), so I'd like to start saying
> hello to everyone first. I am really enjoying this new language!
>
> I am trying to use the standard tests (like test_list.py or
> test_dict.py) from the standard library (Python2.5), but they aren't
> available on a standard Ubuntu Hardy or Ibex installation....
>
> So, the first question is: How do I install the complete Python test
> framework under Ubuntu (Debian)?
You could use BZR or SVN to get a copy of the full Lib/test tree.  Given
your long-disconnected running, I'd consider getting a full source set
for release25-maint.
Note that as of Python 2.6 / 3.0, if Python is not restricted to
system directories for security reasons (if sys.flags.no_user_site is
non-0), you may make a directory in your home directory to be searched.

See   http://docs.python.org/library/site.html
for details on USER_SITE and USER_BASE.

That will allow you to place a test subdirectory under site.USER_SITE
and get to test.test_list (for example) on your python search path.
Since it is a user-specific location, you can make a "tester" user with
the directory in his own space and not worry about affecting the
standard environment.


--Scott David Daniels
[hidden email]
--
http://mail.python.org/mailman/listinfo/python-list
Reply | Threaded
Open this post in threaded view
|

Re: Can't find Python Library packages in Ubuntu (Debian)

Jerzy Jalocha N
In reply to this post by Jerzy Jalocha N
Scott David Daniels wrote:

>> So, the first question is: How do I install the complete Python test
>> framework under Ubuntu (Debian)?
>
> You could use BZR or SVN to get a copy of the full Lib/test tree.  Given
> your long-disconnected running, I'd consider getting a full source set
> for release25-maint.
> Note that as of Python 2.6 / 3.0, if Python is not restricted to
> system directories for security reasons (if sys.flags.no_user_site is
> non-0), you may make a directory in your home directory to be searched.
>
> See   http://docs.python.org/library/site.html
> for details on USER_SITE and USER_BASE.
>
> That will allow you to place a test subdirectory under site.USER_SITE
> and get to test.test_list (for example) on your python search path.
> Since it is a user-specific location, you can make a "tester" user with
> the directory in his own space and not worry about affecting the
> standard environment.

Since I already compiled Python 2.6, and am using it basically only for
testing purposes, this won't be necessary, right now. But someday,
Python 2.6 will get released for Debian, and if it doesn't ship with
the tests, I will come back your instructions. - Thanks, Scott!


Paul Boddie wrote:
>> I will try to contact whoever is responsible for the packaging of Python
>> in Ubuntu (or Debian), and ask them if they are willing to support the
>> _complete_ Python release.
>
> They may already do so, but I'd argue that they could document the
> packages which provide the complete release a bit better if these are
> not already mentioned in /usr/share/doc/python/README.Debian or some
> similar file.

You are right, /usr/share/doc/python2.5/README.Debian
, should contain
that information, but it doesn't.

I already filed a bug in Launchpad, and will move upstream, if necessary.

> By looking at the documentation for the Debian stable source package,
> I did manage to find a list of generated packages:
>
> http://packages.debian.org/source/etch/python-defaults
>
> Perhaps one of these contains the test files.

I checked the most obvious packages there manually without success
before posting my question here. I also used apt-file, which searches for
a specific file in _all_ available packages, including not installed ones,
...no success, again.

> Although such files are
> arguably only of use to people building Python, and such people would
> therefore obtain the source package in order to perform the build
> process, there could be some benefit in having a package which
> provides these files separately. For example, one may wish to verify
> the behaviour of an installed version or to test aspects of another
> implementation.

My personal interest in these tests is the following: I was working with
some sequential dictionaries from ActiveState, but experienced problems
with all recipes. I started writing my own test cases, but found somewhere
a reference about test_dict, test_list et al. Using these, I've been able to
fix a few problems. (Even if some test cases are quite difficult to interpret
right now.)

In general, I think that the Python test suite is extrermely valuable, and
should be made more accessible to all users. Especially in combination
with Python's new Abstract Base Classes, They could prove extremely
useful in creating robust classes with standard interfaces. But I digress.

Thank you, Paul!
--
http://mail.python.org/mailman/listinfo/python-list