[Rubygems-developers] gemspec extensions attribute
luislavena at gmail.com
Tue Nov 6 00:36:53 EST 2007
On 11/6/07, Trans <transfire at gmail.com> wrote:
> One last question (hopefully). In the gemspec it says:
> Type: Array; Optional
> The paths to extconf.rb-style files used to compile extensions.
> spec.extensions << 'ext/rmagic/extconf.rb'
> These files will be run when the gem is installed, causing the C (or
> whatever) code to be compiled on the user's machine.
> But does this have to be extconf.rb scripts? Or can it be any script
> in the package? And does gems run 'make' on its own, or does the
> extconf.rb (or other) scripts need to do that?
The files will be run... with ruby. So it's expecting a ruby script.
Also after the call to ruby extconf.rb will follow a call to make and
copy the resulting .so file to lib folder of the gem.
If extensions is empty, no build process will be launched.
You should create a test gem and check the whole scenario for your own
understanding of the workflow.
I did and make my life more easy :-)
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
More information about the Rubygems-developers