Opened 18 years ago

Closed 15 years ago

Last modified 15 years ago

#9831 closed defect (fixed)

BUG: ~/pydistutils.cfg can break python installs

Reported by: micktwomey@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: pfein@…, blb@…, skymoo (Adam Mercer), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: python24 python25

Description (last modified by blb@…)

When installing darwinports onto a new mac I encountered a problem with the python24 port. I would get the following error when starting up python:

totoro:~ mick$ sudo port install python24 ... totoro:~ mick$ python Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Python 2.4.3 (#1, Jul 10 2006, 11:28:23) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information.

Looking in /opt/local/lib/python2.4 the python libraries and modules were completely missing.

port contents python24 showed that the majority of the python install wound up in my ~/Library/Python/2.4. This lead me to suspect my ~/.pydistutils.cfg as the cause:

[easy_install] site_dirs = ~/Library/Python/2.4/site-packages script_dir = ~/Applications/bin

[install] install_lib = ~/Library/Python/$py_version_short/site-packages install_scripts = ~/Applications/bin

It appears this was overriding the distutils configuration during the python build.

Simply moving my .pydistutils.cfg out of the way and running "sudo port -f install python24" fixed the problem.

It would be good to ignore any pydistutils.cfg files during the port build.

Attachments (1)

python25-9831.tar.bz2 (2.2 KB) - added by blb@… 16 years ago.
tarball of updates to lang/python25 port

Download all attachments as: .zip

Change History (15)

comment:1 Changed 18 years ago by pguyot (Paul Guyot)

Component: basedports
Owner: changed from darwinports-bugs@… to mww@…

comment:2 Changed 17 years ago by nox@…

Milestone: Port Bugs
Priority: ExpectedNormal
Summary: ~/pydistutils.cfg can break python24 installBUG: ~/pydistutils.cfg can break python24 install
Version: 1.2

comment:3 Changed 16 years ago by macports@…

python25 is also broken.

comment:4 Changed 16 years ago by jmroot (Joshua Root)

Summary: BUG: ~/pydistutils.cfg can break python24 installBUG: ~/pydistutils.cfg can break python installs

The python portgroups do ${python.bin} setup.py install --prefix=${prefix} --root=${destroot} for the destroot phase. I guess ~/.pydistutils.cfg must override the options given on the command line. If that is how it's meant to work, is this really our bug?

comment:5 Changed 16 years ago by pfein@…

This is being worked on upstream: http://bugs.python.org/issue1180

comment:6 Changed 16 years ago by pfein@…

Cc: pfein@… added

Cc Me!

comment:7 Changed 16 years ago by blb@…

Cc: blb@… added

Will attach a tarball with a few files:

  • diff to the Portfile
  • a new files/patch-Lib-distutils-dist.py.diff (from issue 1180 mentioned above) to add the --no-user-cfg option
  • an updated files/patch-Makefile.pre.in.diff to use the new --no-user-cfg

Since issue 1180 notes only 2.6, I've created this so python 2.5 at least can make use of it as well.

Changed 16 years ago by blb@…

Attachment: python25-9831.tar.bz2 added

tarball of updates to lang/python25 port

comment:8 Changed 16 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:9 Changed 15 years ago by blb@…

Description: modified (diff)
Port: python24 python25 added

python25 has been updated in r42997 (maintainer timeout).

comment:10 Changed 15 years ago by jmroot (Joshua Root)

Added --no-user-cfg to the build and destroot commands in the python25 portgroup in r45192. Shall we call this fixed, or do we want to backport to python24?

comment:11 Changed 15 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: mcalhoun@… added

Cc Me!

comment:12 in reply to:  10 ; Changed 15 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to jmr@…:

Added --no-user-cfg to the build and destroot commands in the python25 portgroup in r45192. Shall we call this fixed, or do we want to backport to python24?

--no-user-cfg is in python25, pytho26, and python30.
I do not think there is a compelling reason to add it to python24.
I vote that this ticket should be closed.

comment:13 in reply to:  12 Changed 15 years ago by blb@…

Resolution: fixed
Status: newclosed

Replying to mcalhoun@…:

--no-user-cfg is in python25, pytho26, and python30.
I do not think there is a compelling reason to add it to python24.
I vote that this ticket should be closed.

Agreed, 2.5 has been the default for a while now (this ticket is old hence references to 2.4), so unless someone has a really compelling argument for it, closed.

comment:14 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.