#17405 closed update (fixed)
different boost update
Reported by: | adfernandes (Andrew Fernandes) | Owned by: | sanchom (Sancho McCann) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.6.0 |
Keywords: | Cc: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) | |
Port: | boost |
Description (last modified by mf2k (Frank Schima))
Hi - I have a slightly different patch to boost 1.35.0 to 1.37.0. Mine builds openmpi variants, python 2.6, etc. This is a different (more complete) patch than ticket #17338.
Attachments (1)
Change History (13)
comment:1 Changed 16 years ago by mf2k (Frank Schima)
Keywords: | boost removed |
---|---|
Owner: | changed from macports-tickets@… to sanchom@… |
Type: | defect → enhancement |
comment:2 Changed 16 years ago by mf2k (Frank Schima)
Description: | modified (diff) |
---|
comment:3 Changed 16 years ago by adfernandes (Andrew Fernandes)
Yay! Fun! The mpi module now loads if the python26 variant is used! I'm so happy I could just cry! :-) Not sure about 2.5, though... but here's to hoping...
comment:4 Changed 16 years ago by adfernandes (Andrew Fernandes)
Updating the patch to 1.37 revision 2 to change the python mpi.so module. This puts it in
"${prefix}/Library/Frameworks/Python.framework/Versions/${pyversion}/lib/python${pyversion}/site-packages/boost/"
so it can be loaded with
import boost.mpi as mpi
in order to avoid namespace conflicts.
comment:5 Changed 16 years ago by adfernandes (Andrew Fernandes)
Okay, okay - I'm really sorry to be constantly updating this - but I'm a python newbie and (sheepish grin) I forgot to add the init.py file.
Now the following program works without damn import errors:
#/usr/bin/env python2.6 import boost.mpi as mpi # OR 'from boost import mpi' (both work) print "I am process %d of %d." % (mpi.rank, mpi.size)
This is Revision 3. Sorry. I hope this is the last update.
Changed 16 years ago by adfernandes (Andrew Fernandes)
Attachment: | Portfile.patch added |
---|
1.37.0 Revision 3
comment:6 Changed 16 years ago by adfernandes (Andrew Fernandes)
Even better - the whole boost-python interface appears to work.
Makefile :
YFRM = /opt/local/Library/Frameworks/Python.framework/Versions/2.6 PYINC = -I$(PYFRM)/include/python2.6 -L/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config MACPT = -I/opt/local/include -L/opt/local/lib LIBS = -dynamiclib -lboost_python-xgcc40-mt -lpython2.6 hello.so : hello.cpp $(CXX) $(MACPT) $(PYINC) $? $(LIBS) -o $@ .PHONY : test clean test : test.py ./test.py clean : rm -f hello.so
hello.cpp :
char const* greet() { return "hello, world"; } #include <boost/python.hpp> BOOST_PYTHON_MODULE(hello) { using namespace boost::python; def("greet", greet); }
test.py :
#!/usr/bin/env python2.6 import sys sys.path.append('.') import hello print hello.greet()
comment:7 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Cc: | mcalhoun@… added |
---|
Cc Me!
comment:8 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
comment:9 Changed 16 years ago by sanchom (Sancho McCann)
Agree. We should close this. If there are issues with the r43281, we should open new tickets to patch against that revision.
comment:10 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:11 Changed 16 years ago by jmroot (Joshua Root)
Type: | enhancement → update |
---|
Assigning to maintainer.