473,416 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

install python to custom prefix with custom library directories

Today I needed to install python from source on linux to a custom path. /usr/lib/libtk8.3.so existed, but I wanted python to link to /my/custom/path/lib/libtk8.4.so.

I had LDFLAGS set:

LDFLAGS="-L/my/custom/path/lib -Wl,-rpath,$base/lib -Wl,--enable-new-dtags"

configure looked like this:

../configure --prefix=/my/custom/path/python-2.5.1 --enable-shared

but python always linked against /usr/lib/libtk8.3.so instead of libtk8.4.so

I ended up modifying setup.py (see below) but there must be a more user-friendly way to do this. Right? Thank you for your time!

BTW, I don't have root access on this machine

--- setup.py.original 2007-07-17 12:51:27 -04:00
+++ setup.py 2007-07-17 13:21:57 -04:00
@@ -293,10 +293,14 @@
# lib_dirs and inc_dirs are used to search for files;
# if a file is found in one of those directories, it can
# be assumed that no additional -I,-L directives are needed.
+ self.compiler.library_dirs.insert(0,
+ '/my/custom/path/lib')
lib_dirs = self.compiler.library_dirs + [
'/lib64', '/usr/lib64',
'/lib', '/usr/lib',
]
+ self.compiler.include_dirs.insert(0,
+ '/my/custom/path/include')
inc_dirs = self.compiler.include_dirs + ['/usr/include']
exts = []

--
Poor Yorick
Jul 17 '07 #1
0 1170

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Richard Petty | last post by:
I've got a machine running Yellow Dog Linux (a PPC version of Red Hat) which has Python 1.5.2-35a and I'd like to update. I'd prefer to install from sources rather than depend on other people to...
1
by: danu kusmana | last post by:
Im using Python 2.3.4 and Mandrake linux 10.0. I don't know whats wrong when Im trying to install the PyOpengl-2.0.1.08. I got the message: gcc -pthread -shared...
2
by: ariza | last post by:
greetings. it seems that the attribute site.here, of the site module, has vanished in python 2.4. up until python 2.3, site.here seemed (to me at least) a convenient way to get the complete path to...
44
by: Xah Lee | last post by:
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical, but you don't know which ones are...
2
by: MENTAT | last post by:
Hi, I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically...
0
by: fqueirolo | last post by:
Hello all I am trying to install boost.python on my XP box. Boost: 1.33.0 Python: 2.4.2 (Final) MinGw: 4.1.1 I try: D:\Dev\boost_1_33_0\libs\python\build>bjam...
4
by: Christopher Taylor | last post by:
Hello all, Being relatively new to linux I'm a little confused about what options I need to use to build python from source. Currently, I have python installed as part of the inital RHEL4 load...
3
by: Tina I | last post by:
Another noob question: I have written my first linux application that might actually be of interest to others. Just for fun I also wrote an install script that put the files in the common...
3
by: =?UTF-8?Q?Ahmad_=E3=8B=A1_Baitalmal?= | last post by:
Hi, I'm having a hard time getting python-mcrypt extension to build. I installed libmcrypt with --prefix=/usr and I checked that the library exists -rwxr-xr-x 1 root wheel 352K Sep 19...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.