[Patches] [ python-Patches-463656 ] setup.py, --with-includepath, and LD_LIB

SourceForge.net noreply at sourceforge.net
Sat Sep 20 11:46:16 EDT 2003


Patches item #463656, was opened at 2001-09-21 21:12
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=463656&group_id=5470

Category: Distutils and setup.py
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Frederic Giacometti (giacometti)
Assigned to: Martin v. Löwis (loewis)
Summary: setup.py, --with-includepath, and LD_LIB

Initial Comment:
This patch improves the module detection capability in

setup.py.



The following improvements are implemented:



- directories listed in LD_LIBRARY_PATH are also

searched for shared libraries.



- the --with-includepath option has been added to

configure, to specify additional  non-standard

directories where the include files are to be searched

for.



The corresponding changes were added to setup.py (new

function detect_include(),  find_library_file()

augmented, detect_tkinter() improved)



I retroceeded manually the changes from configure into

configure.in, but I did not run autoconf; you might

want to double-check this.



Sample aplication:

./configure --prefix=/something

--with-includepath='/mgl/apps/include:/mgl/share/include'



With this patch, I get Tkinter to build correctly

without editing the Setup files, with non-standard

tckl/tk 8.0 to 8.3 installations. where the only tcl.h

file is in /mgl/share/include/tcl8.0 (therefore,

tkinter is build with tcl8.0 on this configuration).



FG

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2003-09-20 17:46

Message:
Logged In: YES 
user_id=21627

Ok, I'm rejecting the patch. It is outdated, and it is also

partially wrong: LD_LIBRARY_PATH should not be used to

determine directories which the static linker should look

in; using LD_RUN_PATH for that might be a better choice.

With LD_LIBRARY_PATH, the administrator would get an

installation which might not work for his users, and he

might not even know why it fails for users when it works for

him. If additional directories are searched, the

administrator needs to request them in a more explicit way.



Frederic, if you are still interested in such a feature,

please submit a patch against 2.3 or current CVS, and I

promise to review it in a more timely manner.

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2003-05-09 02:30

Message:
Logged In: YES 
user_id=357491

Is that last response a "yes" or a "no"?  =)



Any of the distutils guys think we should apply this patch or can we finally 

close this (it was opened over a 1.5 years ago)?

----------------------------------------------------------------------

Comment By: Frederic Giacometti (giacometti)
Date: 2002-08-17 21:24

Message:
Logged In: YES 
user_id=93657



On one hand, using -I and -L from setup.py would simplify

the setup.py code, but on the other hand, in the present

build system, this will require coding in configure.in some

of what we can write in python in setup.py (e.g. the use of

LD_SHARED_LIBRARY by default).



I know we get the eternal story (I already hear it every day

with Perl, awk, and various forms of platform-dependent

shell scripting), that autoconf is a great and well-known

programming language which everybody uses, and why should we

do in Python what we can already do in autoconf, and so on...

I wish I could put a smiley on this, but I stopped laughing

at this things, since I meet them endlessly.



Regards,



FG







----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-08-14 16:56

Message:
Logged In: YES 
user_id=21627

Frederic, do you still think there is a need for this patch?

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2002-01-17 18:58

Message:
Logged In: YES 
user_id=6656

You do know that you can pass -I and -L options to setup.py?

 That might be a less involved way of doing what you want.

----------------------------------------------------------------------

Comment By: Frederic Giacometti (giacometti)
Date: 2001-09-28 02:17

Message:
Logged In: YES 
user_id=93657

I moved the functions

  find_library_file() and  detect_include()

to distutils.sysconfig(), so that they can be reused for

configuring third party modules too (e.g.: PyOpenGL...).



Let me know if you wish a patch for this.



Frederic Giacometti





----------------------------------------------------------------------

Comment By: Frederic Giacometti (giacometti)
Date: 2001-09-27 00:56

Message:
Logged In: YES 
user_id=93657

I'm replacing the patch with an improved version (against

main line as of 09/26/01).



New features:



- configure is generated from configure.in, with autoconf



- detect_tkinter also checks the version number inside the

tcl.h and tk.h files (#define TCL_VERSION, #define

TK_VERSION...).



The 'tk_detect' improvement is in this same patch as the

'--include-patch' feature; since the second one was written

to get the first one working.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=463656&group_id=5470



More information about the Patches mailing list