Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > ubuntu dist-packages

Reply
Thread Tools

ubuntu dist-packages

 
 
Robin Becker
Guest
Posts: n/a
 
      08-26-2009
I was surprised a couple of days ago when trying to assist a colleage with his
python setup on a ubuntu 9.04 system.

We built our c-extensions and manually copied them into place, but site-packages
wasn't there. It seems that ubuntu now wants stuff to go into
lib/python2.6/dist-packages.

What is the relation between dist-packages/site-packages if any? Is this just a
name change or is there some other problem being addressed?

For developers is it best just to create one's own private installations from
the original tarballs?
--
Robin Becker

 
Reply With Quote
 
 
 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      08-26-2009
Robin Becker wrote:

> I was surprised a couple of days ago when trying to assist a colleage with
> his python setup on a ubuntu 9.04 system.
>
> We built our c-extensions and manually copied them into place, but
> site-packages wasn't there. It seems that ubuntu now wants stuff to go
> into lib/python2.6/dist-packages.
>
> What is the relation between dist-packages/site-packages if any? Is this
> just a name change or is there some other problem being addressed?
>
> For developers is it best just to create one's own private installations
> from the original tarballs?


I don't know much about the atrocities distributions commit to
python-installations (ripping out distutils "because it's a developer-only
thing", trying to save a few bytes here and there by unifying
install-locations between interpreter versions and whatnot), but I think
the main problem is that you don't use distutils - or setuptools (that gets
often a bad rap even if for most cases it works flawless)

If you'd use that to build & install your extension, it would figure out
where to place the resulting package (or egg) by itself.

Diez
 
Reply With Quote
 
 
 
 
Jorgen Grahn
Guest
Posts: n/a
 
      08-26-2009
On Wed, 26 Aug 2009 12:46:13 +0200, Diez B. Roggisch
<(E-Mail Removed)> wrote:
> Robin Becker wrote:
>
>> I was surprised a couple of days ago when trying to assist a colleage with
>> his python setup on a ubuntu 9.04 system.
>>
>> We built our c-extensions and manually copied them into place, but
>> site-packages wasn't there. It seems that ubuntu now wants stuff to go
>> into lib/python2.6/dist-packages.

....

> I don't know much about the atrocities distributions commit to
> python-installations (ripping out distutils "because it's a developer-only
> thing",


Well, if you are thinking about Debian Linux, it's not as much
"ripping out" as "splitting into a separate package with a non-obvious
name". Annoying at times, but hardly an atrocity.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
Robin Becker
Guest
Posts: n/a
 
      08-26-2009
Jorgen Grahn wrote:
> On Wed, 26 Aug 2009 12:46:13 +0200, Diez B. Roggisch

.........
> Well, if you are thinking about Debian Linux, it's not as much
> "ripping out" as "splitting into a separate package with a non-obvious
> name". Annoying at times, but hardly an atrocity.

so where is the official place for user installed stuff on ubuntu/debian ie will
there be dist-packages and site-packages.
--
Robin Becker
 
Reply With Quote
 
Robin Becker
Guest
Posts: n/a
 
      08-26-2009
Jorgen Grahn wrote:
> On Wed, 26 Aug 2009 12:46:13 +0200, Diez B. Roggisch

.........
> Well, if you are thinking about Debian Linux, it's not as much
> "ripping out" as "splitting into a separate package with a non-obvious
> name". Annoying at times, but hardly an atrocity.

so where is the official place for user installed stuff on ubuntu/debian ie will
there be dist-packages and site-packages.
--
Robin Becker

 
Reply With Quote
 
Florian Diesch
Guest
Posts: n/a
 
      08-26-2009
Robin Becker <(E-Mail Removed)> writes:

> I was surprised a couple of days ago when trying to assist a colleage
> with his python setup on a ubuntu 9.04 system.
>
> We built our c-extensions and manually copied them into place, but
> site-packages wasn't there. It seems that ubuntu now wants stuff to go
> into lib/python2.6/dist-packages.
>
> What is the relation between dist-packages/site-packages if any? Is
> this just a name change or is there some other problem being
> addressed?
>
> For developers is it best just to create one's own private
> installations from the original tarballs?


From /usr/lib/python2.6/site.py:

,----
| For Debian and derivatives, this sys.path is augmented with directories
| for packages distributed within the distribution. Local addons go
| into /usr/local/lib/python<version>/dist-packages, Debian addons
| install into /usr/{lib,share}/python<version>/dist-packages.
| /usr/lib/python<version>/site-packages is not used.
`----




Florian
--
<http://www.florian-diesch.de/software/pdfrecycle/>
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a
 
      08-26-2009
On Wed, 26 Aug 2009 17:20:35 +0100, Robin Becker <(E-Mail Removed)> wrote:
> Jorgen Grahn wrote:
>> On Wed, 26 Aug 2009 12:46:13 +0200, Diez B. Roggisch

> ........
>> Well, if you are thinking about Debian Linux, it's not as much
>> "ripping out" as "splitting into a separate package with a non-obvious
>> name". Annoying at times, but hardly an atrocity.


> so where is the official place for user installed stuff on
> ubuntu/debian ie will
> there be dist-packages and site-packages.


I don't know, but I know Debian has a group of people working out how
to package Python and software written in Python. Those guys have a
home page somewhere at debian.org -- there should be information
there, and/or under /usr/share/doc/python* on your system.

Another answer is "let distutils do its job and do not worry", but
sometimes you need to know the rules and the reasons ...

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
Paul Boddie
Guest
Posts: n/a
 
      08-26-2009
On 26 Aug, 17:48, Jorgen Grahn <(E-Mail Removed)> wrote:
>
> Well, if you are thinking about Debian Linux, it's not as much
> "ripping out" as "splitting into a separate package with a non-obvious
> name". Annoying at times, but hardly an atrocity.


Indeed. Having seen two packages today which insisted on setuptools,
neither really needing it, and with one actively trying to download
stuff from the Internet (fifteen seconds warning - how generous!) when
running setup.py, it seems to me that it isn't the distribution
packagers who need to be re-thinking how they install Python software.

Generally, distributions have to manage huge amounts of software and
uphold reasonable policies without creating unnecessary maintenance.
Sadly, until very recently (and I'm still not entirely sure if there's
really been an attitude change) the Pythonic packaging brigade has
refused to even consider the needs of one of the biggest groups of
consumers of the upstream code. Consequently, distributions will
always devise different ways of storing installed Python software,
documentation and resources, mostly because the Pythonic tools have
been deficient, particularly in the management of the latter
categories.

Paul
 
Reply With Quote
 
Robin Becker
Guest
Posts: n/a
 
      08-27-2009
Florian Diesch wrote:
..........
>
>>From /usr/lib/python2.6/site.py:

>
> ,----
> | For Debian and derivatives, this sys.path is augmented with directories
> | for packages distributed within the distribution. Local addons go
> | into /usr/local/lib/python<version>/dist-packages, Debian addons
> | install into /usr/{lib,share}/python<version>/dist-packages.
> | /usr/lib/python<version>/site-packages is not used.
> `----


the above is not present in my windows documentation (or indeed site.py) at all
so it seems they just decided to change the name. Anyone trying to debug why
their distutils or setuptools or whichever python packager is going wrong will
have yet another detail to remember. In addition, as any one who has done such
trivial changes will already know, they forgot to do it globally eg my 0.4.1.0
version of the "Debian Python Policy" document explicitly mentions site-packages.
--
Robin Becker
 
Reply With Quote
 
Robin Becker
Guest
Posts: n/a
 
      08-27-2009
Florian Diesch wrote:
..........
>
>>From /usr/lib/python2.6/site.py:

>
> ,----
> | For Debian and derivatives, this sys.path is augmented with directories
> | for packages distributed within the distribution. Local addons go
> | into /usr/local/lib/python<version>/dist-packages, Debian addons
> | install into /usr/{lib,share}/python<version>/dist-packages.
> | /usr/lib/python<version>/site-packages is not used.
> `----


the above is not present in my windows documentation (or indeed site.py) at all
so it seems they just decided to change the name. Anyone trying to debug why
their distutils or setuptools or whichever python packager is going wrong will
have yet another detail to remember. In addition, as any one who has done such
trivial changes will already know, they forgot to do it globally eg my 0.4.1.0
version of the "Debian Python Policy" document explicitly mentions site-packages.
--
Robin Becker

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Ubuntu is About to Drop Another Turd! Ubuntu 10.04 Clogwog Computer Support 0 04-29-2010 08:00 PM
Learn python packaging for Ubuntu and Debian in the Ubuntu Open Week SPE - Stani's Python Editor Python 1 04-29-2008 11:51 AM
"What is it About Ubuntu?" at XYZ Computing Silverstrand Front Page News 0 12-12-2005 10:06 PM
Ubuntu linux firefox users Colyn Firefox 7 07-07-2005 12:56 PM



Advertisments