Re: Python 2.5 from source without tcl/tk

2007-07-04 Thread Florian Demmer
ok... cannot get rid of the "INFO: Can't locate Tcl/Tk libs and/or
headers".

Now same thing but weirder with curses:
i do not have ncurses-devel installed. still make trys to compile the
curses module.
how do i prevent that?

imo the configure should have more with/without switches... or do i
just miss the point, where to tell it which modules to compile and
which not?

-- 
http://mail.python.org/mailman/listinfo/python-list


Python 2.5 from source without tcl/tk

2007-07-03 Thread Florian Demmer
Hi,

I am going nuts here... I thought had a solution for this a few weekas
ago but my hdd crashed and i put the note i wrote somewhere I had no
backup.

The system is a RedHat Enterprise 4 and I cannot install additional
rpms.
While the ./configure seems to go through fine I get a "INFO: Can't
locate Tcl/Tk libs and/or headers" during the make.

tk.h and tcl.h are in /usr/include
In other discussions I found that a missing X11/Xlib.h can be the
problem. That I don't have and cannot install.

Is there a way to completely leave out the tcl stuff when compiling?

I think what i did few weeks back was temporarily moving some tcl/tk
files away and back after the installation... but I cannot get it to
work now :(

-- 
http://mail.python.org/mailman/listinfo/python-list


Interrupting ftplib.storbinary()

2007-04-26 Thread Florian Demmer
Hi!

I have a number of ftp uploads running in parallel using
ftplib.storbinary and threading and in case one of them fails I need
to interrupt all the others (but not exit the program completely)...
do you guys have an idea how i could implement the interruption as
cleanly as possible?

thanks!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: 2.5 from source install problem with extensions

2007-04-19 Thread Florian Demmer
On Apr 18, 7:39 pm, Anton Hartl <[EMAIL PROTECTED]> wrote:
> Hi,
>
> On 2007-04-18, Florian Demmer <[EMAIL PROTECTED]> wrote:
>
> > On Apr 18, 12:36 pm, Florian  Demmer <[EMAIL PROTECTED]> wrote:
> >> Hi!
>
> >> I am doing a from source installation of Python 2.5 on some old Debian
> >> machine. As the target directoy I want /opt/somename so i added it to
> >> the configure like so:
>
> >> ./configure --prefix=/opt/somedir
>
> >> The following make works fine as far as I can see. Then the make
> >> install also actually works and installs python in /opt/somedir with
> >> all its subdirectoris (bin, lib, man, include).
> >> The extensions (*.so) however get put in /usr/local/lib/... and there
> >> also in the wrong python directoy: 2.4
>
> Basically I had the same problem(s).
>
> >> (How) can I change the install_dir for the extensions?
> >> Why does it use python2.4 anyway?! What env var or else is set here
> >> that I cannot find?
>
> I've patched setup.py as follows:
>
> --- setup.py.orig   Thu Aug 10 01:42:18 2006
> +++ setup.pyMon Dec 25 19:05:29 2006
> @@ -147,6 +147,14 @@
>  if ext.name in sys.builtin_module_names:
>  self.extensions.remove(ext)
>
> +   # so -lpython2.5 works in the build
> +   ext.library_dirs.append('.')
> +
> +   # so shared libs requiring libpython2.5.so work
> +   py_instdir = os.environ.get("INSTDIR_PYTHON", None)
> +   if py_instdir:
> +   ext.library_dirs.append(os.path.join(py_instdir, 'lib'))
> +
>  if platform != 'mac':
>  # Parse Modules/Setup and Modules/Setup.local to figure out which
>  # modules are turned on in the file.
>
> Then you have to add INSTDIR_PYTHON to your shell environment, i.e.
>
> INSTDIR_PYTHON=/opt/somedir ; export INSTDIR_PYTHON
>
> or whatever your shell requires.
>
> This works for me.  Hope it helps,

nice workaround (and it does work), thank you...
at least until when i try to install Python2.6 and forget about that
again ;)

since i was not quite satisfied by the solution (i will have to
install py25 from source on a customer's system that i dont know much
about yet at a later time and that _has_ to work then), i searched for
more reasons why it fails in the first place... and actually found
something:

~/.pydistutils.cfg
--> install_lib = /usr/local/lib/python2.4/site-packages

... uncommented it and ran make install again --> works! :D

br
Florian

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: 2.5 from source install problem with extensions

2007-04-18 Thread Florian Demmer
On Apr 18, 12:36 pm, Florian  Demmer <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I am doing a from source installation of Python 2.5 on some old Debian
> machine. As the target directoy I want /opt/somename so i added it to
> the configure like so:
>
> ./configure --prefix=/opt/somedir
>
> The following make works fine as far as I can see. Then the make
> install also actually works and installs python in /opt/somedir with
> all its subdirectoris (bin, lib, man, include).
> The extensions (*.so) however get put in /usr/local/lib/... and there
> also in the wrong python directoy: 2.4

...and the current /usr/bin/python symlink points to the 2.4
installation (from .deb)

> This is a c/p of the make install output:
> [...]
> running build_scripts
> running install_lib
> changing mode of /usr/local/lib/python2.4/site-packages/_struct.so to
> 755
> changing mode of /usr/local/lib/python2.4/site-packages/_ctypes.so to
> 755
> [...]
>
> (How) can I change the install_dir for the extensions?
> Why does it use python2.4 anyway?! What env var or else is set here
> that I cannot find?
>
> thanks!


-- 
http://mail.python.org/mailman/listinfo/python-list


2.5 from source install problem with extensions

2007-04-18 Thread Florian Demmer
Hi!

I am doing a from source installation of Python 2.5 on some old Debian
machine. As the target directoy I want /opt/somename so i added it to
the configure like so:

./configure --prefix=/opt/somedir

The following make works fine as far as I can see. Then the make
install also actually works and installs python in /opt/somedir with
all its subdirectoris (bin, lib, man, include).
The extensions (*.so) however get put in /usr/local/lib/... and there
also in the wrong python directoy: 2.4

This is a c/p of the make install output:
[...]
running build_scripts
running install_lib
changing mode of /usr/local/lib/python2.4/site-packages/_struct.so to
755
changing mode of /usr/local/lib/python2.4/site-packages/_ctypes.so to
755
[...]

(How) can I change the install_dir for the extensions?
Why does it use python2.4 anyway?! What env var or else is set here
that I cannot find?

thanks!

-- 
http://mail.python.org/mailman/listinfo/python-list