Simple cctbx / boost c++ extension example
Hi Folks, Just say I wanted to write a new from the ground up module for cctbx which wanted to include some C++ code, and a SConscript etc. so I can run libtbx.configure toytbx (say) And then find from toytbx import cplusplus_functions would work.... Is there an example I could follow? (I have not looked through the newsletters, I suppose I should have... but I could not seen anything obvious in the documents) Thanks, Graeme Dr. Graeme Winter Senior Software Scientist Diamond Light Source +44 1235 778091 (work) +44 7786 662784 (work mobile) -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
On Wed, Jan 9, 2013 at 7:55 AM,
Just say I wanted to write a new from the ground up module for cctbx which wanted to include some C++ code, and a SConscript etc. so I can run
libtbx.configure toytbx
(say)
And then find
from toytbx import cplusplus_functions
would work…. Is there an example I could follow?
The closest thing I can think of is the 'fable' module (Ralf's F77-to-C++ converter). It's fairly minimal and there is just a little bit of C++ code involved. Note that there are probably a half-dozen ways to structure the extension code and we use all of them somewhere; this is just one way to do it. -Nat
Thanks Nat - that looks like a nice small example.
I will have a play...
Best wishes,
Graeme
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nathaniel Echols
Sent: 09 January 2013 16:04
To: cctbx mailing list
Subject: Re: [cctbxbb] Simple cctbx / boost c++ extension example
On Wed, Jan 9, 2013 at 7:55 AM,
Just say I wanted to write a new from the ground up module for cctbx which wanted to include some C++ code, and a SConscript etc. so I can run
libtbx.configure toytbx
(say)
And then find
from toytbx import cplusplus_functions
would work.... Is there an example I could follow?
The closest thing I can think of is the 'fable' module (Ralf's F77-to-C++ converter). It's fairly minimal and there is just a little bit of C++ code involved. Note that there are probably a half-dozen ways to structure the extension code and we use all of them somewhere; this is just one way to do it. -Nat _______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
Thanks Nat - that worked a treat.
I now have my toytbx working. I will write down what to do for new starters.
Do we have a wiki yet for this kind of thing?
Thanks,
Graeme
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: 09 January 2013 16:08
To: [email protected]
Subject: Re: [cctbxbb] Simple cctbx / boost c++ extension example
Thanks Nat - that looks like a nice small example.
I will have a play...
Best wishes,
Graeme
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nathaniel Echols
Sent: 09 January 2013 16:04
To: cctbx mailing list
Subject: Re: [cctbxbb] Simple cctbx / boost c++ extension example
On Wed, Jan 9, 2013 at 7:55 AM,
Just say I wanted to write a new from the ground up module for cctbx which wanted to include some C++ code, and a SConscript etc. so I can run
libtbx.configure toytbx
(say)
And then find
from toytbx import cplusplus_functions
would work.... Is there an example I could follow?
The closest thing I can think of is the 'fable' module (Ralf's F77-to-C++ converter). It's fairly minimal and there is just a little bit of C++ code involved. Note that there are probably a half-dozen ways to structure the extension code and we use all of them somewhere; this is just one way to do it. -Nat _______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom _______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
On Thu, Jan 10, 2013 at 2:30 AM,
Thanks Nat - that worked a treat.
I now have my toytbx working. I will write down what to do for new starters.
Do we have a wiki yet for this kind of thing?
Hah, not yet. Are we starting to reach the point where we need one? Does anyone know if SourceForge has some kind of facility for this already, or would we have to host it ourselves? -Nat
sf.net will give you one for free, but you need to switch it on (needs a project admin to do this)
xia2.sf.net has a wiki. It's empty, but there is a wiki. One day I will find some time to put some words in there.
Right now though I would like more to put words into a cctbx wiki.
Cheerio,
Graeme
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nathaniel Echols
Sent: 10 January 2013 14:27
To: cctbx mailing list
Subject: Re: [cctbxbb] Simple cctbx / boost c++ extension example
On Thu, Jan 10, 2013 at 2:30 AM,
Thanks Nat - that worked a treat.
I now have my toytbx working. I will write down what to do for new starters.
Do we have a wiki yet for this kind of thing?
Hah, not yet. Are we starting to reach the point where we need one? Does anyone know if SourceForge has some kind of facility for this already, or would we have to host it ourselves? -Nat _______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
On Thu, Jan 10, 2013 at 6:33 AM,
sf.net will give you one for free, but you need to switch it on (needs a project admin to do this)
xia2.sf.net has a wiki. It's empty, but there is a wiki. One day I will find some time to put some words in there.
Right now though I would like more to put words into a cctbx wiki.
Okay, it looks like I need to upgrade our account to use the wiki. This has been on my to-do list ever since I got an email from SF about it, but I've been waiting for a moment when it would cause minimal disruption. I'd hoped that would be around Christmas, but we were trying to get a new Phenix release out and I didn't want to interfere with that. As soon as we finally release an installer (later this month?) I will make the change and also set up the wiki - will send an email to the list when this happens, since our suspicion is that it will change the SVN URL. -Nat
participants (2)
-
Graeme.Winter@diamond.ac.uk
-
Nathaniel Echols