Issue 24816 - Cannot install 3rd party products on shipped python
Summary: Cannot install 3rd party products on shipped python
Status: CLOSED WONT_FIX
Alias: None
Product: udk
Classification: Code
Component: code (show other issues)
Version: OOo 1.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: joergbudi
QA Contact: issues@udk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-25 21:10 UTC by zagy
Modified: 2007-06-18 10:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description zagy 2004-01-25 21:10:04 UTC
zagy@lrrr:/sw/src/PyXML-0.8.3> alias python
alias python='/Users/zagy/development/ooo/ooo-install/program/python'
zagy@lrrr:/sw/src/PyXML-0.8.3> python setup.py build
Traceback (most recent call last):
  File "setup.py", line 60, in ?
    if get_config_var("LDSHARED").find("-flat_namespace") == -1:
  File
"/Users/zagy/development/ooo/ooo-install/program/python-core/lib/distutils/sysconfig.py",
line 444, in get_config_var
    return get_config_vars().get(name)
  File
"/Users/zagy/development/ooo/ooo-install/program/python-core/lib/distutils/sysconfig.py",
line 421, in get_config_vars
    func()
  File
"/Users/zagy/development/ooo/ooo-install/program/python-core/lib/distutils/sysconfig.py",
line 326, in _init_posix
    raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to
open
/Users/zagy/development/ooo/ooo-install/program/python-core/lib/python2.2/config/Makefile
(No such file or directory)


I guess this is due to the non-standard directory structure.
Comment 1 khendricks 2004-01-25 21:45:54 UTC
Hi, 
 
Could be more specific here?  Exactly what steps are you doing?  I will need to recreate this on 
my own machine to see exactly what is going wrong here.  Python has a number of env vars that 
can be set to tell it where to look for things. 
 
The simplest example possible would be best. 
 
Thanks, 
 
Kevin 
 
 
 
Comment 2 khendricks 2004-01-25 22:18:15 UTC
Hi, 
 
This could simply be an omission in the python/prj/d.lst file that does not include or keep the 
config/ subdirectory and its contents alothough they exist in the python-inst build tree made in the 
python module. 
 
But I am not sure.  Why exactly does another python module need to find and use the 
config/Makefile from the previous python build?  It kind of defeats the purpose doesn't it? 
 
 
I think this could be remedied by changing the d.lst file in python/prj/ but I am not 100% positive 
as to why this piece of the python build was left out. 
 
Kevin 
 
Comment 3 zagy 2004-01-26 06:19:53 UTC
Ok, more detail

* compiled cws_fix645_ooo111fix2 on Panther
* installed
* fixed the [Dd]arwin bug
* aliased python
* downloaded and extracted PyXML
* tried to install PyXML

pyxml requires to compile some C code (for expat I think). The
lib/python2.x/config is used by distools to figure out which compiler to use,
which modules are built into python etc.

Please also note that the disttools are looking in
python-core/lib/python2.2/config/Makefile while the acutal libs are placed into
python-core/lib leaving out the python2.2.

Comment 4 zagy 2004-01-26 06:41:36 UTC
Checked on Intel/Linux. Doens't work either. 

Setting Plattform to All
Setting OS to All
Comment 5 kay.ramme 2004-01-26 09:11:27 UTC
Joerg, please help with this.
Comment 6 zagy 2004-01-26 16:39:09 UTC
The `include' directory is also missing.
Comment 7 joergbudi 2004-01-26 19:29:02 UTC
Hi,

as I stated in dev@udk.openoffice.org, my interest in python lies in having a
good scripting language to tie together OOo components. This unfortunately
requires to ship a python for numerous reasons mentioned elsewhere.

For the records, I never wanted to support all the bells and whistles for
python, so I drew the border by just supporting the python standard packages. 

I think, it is simply not possible to support distutils. Have a look at all
these variables which are needed by this setup mechanism (e.g. I see  LDSHARED
in the given stacktrace). As OOo is executed on different machines as it has
been built, all these variables must be different, so this never can  work out.
These two concepts of software deployment simply cannot be merged.

People, who want to do this, should download the python package themself (using
the same version as OOo does, 2.2.2), rebuilt it with the identical gcc compiler
(here  gcc-3.2.3) on their machine and let the python-core link in the program
directory point to this installation.

Agreed ?

Bye,

Joerg 

PS: For the technical details, the python core directory is built in
pyuno/zipcore directory. But as I stated, it does not help to add the missing files.
Comment 8 azaroth 2004-01-26 20:52:50 UTC
Please mark 'WONTFIX' unless someone volunteers to do it at which point it can
be re-assigned. Disappointing.
Comment 9 zagy 2004-01-26 21:28:54 UTC
I'd love to use my own python. Unfortunately this doesn't work on Mac OS X. My
Python refuses to load dynamic librarys (.dylib). It only want's to load bundles
(.so)

 
Comment 10 zagy 2004-01-27 10:56:48 UTC
Now I got something running:

A Python 2.2.2, with the Python-2.2.2.patch from the ooo/python applied does
load the pyuno.dyld and works on OS X.
Comment 11 joergbudi 2004-02-17 19:22:48 UTC
Hi,

as discussed earlier, it cannot be fixed.

Bye,

Joerg
Comment 12 kay.ramme 2007-06-18 10:33:30 UTC
This issue has been "RESOLVED" for quite a time, I assume I can close it ...