ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
[C++-sig] How to install extensions using bjam(?)
by Amos Anderson other posts by this author
Oct 22 2009 12:13PM messages near this date
Re: [C++-sig] Python converters for raw pointers: request for help | Re: [C++-sig] How to install extensions using bjam(?)
Hello --

I'm working on a project which is mixed C++/Python, and we use Boost
functionality in our C++, and we've set up bjam to compile our project
(on OSX). Everything seems to be working quite well.

To use our libraries from python scripts right now, we have to run this first:

#!/bin/bash
trunk=$HOME/project/trunk/
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$trunk/lib
export PYTHONPATH=$trunk:$trunk/lib
python $@


which is quite inconvenient. Now obviously I can skip this step by
pasting those two export statements into my .profile, however, at some
point we're going to start distributing this software and it would be
nice if we didn't require the end user to do something like that.

I can't believe that either of these 2 steps are how it's supposed to
work... so how should I be doing it?  Ideally, I want to set something
up so that the end user only has to run 1 (one) command to build &
install. Here are some things I've thought about:

1) Having bjam edit the user's .profile to set up these paths,
possibly by calling a script I write. This doesn't seem like the right
approach to me.

2) It looks like python's distutils is supposed to be able to help,
but it seems like a waste of time to figure out how to get distutils
to compile my code when I already have bjam pretty much figured out.
First, I assume that distutils can put my libraries on an automatic
DYLD_LIBRARY_PATH path that python knows about, because if it can't
then there's no point. But assuming that's not a problem, I can't
figure out how to tell distutils about Extensions that it shouldn't
try to build...

3) bjam includes a way to install libraries into a folder I can name,
but does it have a way to set environment variables? or automatically
figure out the right places to put all the python files? If so, I
can't find it...

4) ?


thanks!

Amos.
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@[...].org
http://mail.python.org/mailman/listinfo/cplusplus-sig
Thread:
Amos Anderson
Anthony Foglia
Amos Anderson
Anthony Foglia
Nat Goodspeed

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved