Using hoe to create gems with C extensions

D

Dido Sevilla

QXMgZmFyIGFzIEkgY2FuIHRlbGwsIEhvZSBieSBpdHNlbGYgZG9lc24ndCBoYXZlIGFueXRoaW5n
IGF2YWlsYWJsZSB0bwpmYWNpbGl0YXRlIHRoZSBjcmVhdGlvbiBvZiBnZW1zIHRoYXQgY29udGFp
biBDIGV4dGVuc2lvbnMuIE9mIHRoZSBnZW1zCnRoYXQgSSBoYXZlIGluc3RhbGxlZCB3aGljaCBk
byBoYXZlIGV4dGVuc2lvbnMsIG5vbmUgb2YgdGhlbSBzZWVtIHRvCmFsc28gdXNlIGhvZSwgc28g
SSBkb24ndCByZWFsbHkgaGF2ZSBhbnkgZXhhbXBsZXMgdG8gZ28gYnkuIEFueQpzdWdnZXN0aW9u
cyBmb3IgYmVzdCBwcmFjdGljZSB3aGVuIGRvaW5nIHRoaXMgc29ydCBvZiB0aGluZz8KCi0tIArm
ma7pgJrjgZjjgoPjgarjgYTjga7jgYzlvZPnhLbjgarjgonnrZTjgYjjgovnp4Hjga/kvZXjgYzj
gafjgY3jgovvvJ8K5pmu6YCa44Gn44KC5pmu6YCa44GY44KD44Gq44GP44Gm5oSf44GY44KL44G+
44G+5oSf44GY44KL44GT44Go44Gg44GR44KS44GZ44KL44KI77yBCmh0dHA6Ly9zdG9ybXd5cm0u
YmxvZ3Nwb3QuY29tCg==
 
R

Ryan Davis

As far as I can tell, Hoe by itself doesn't have anything available to
facilitate the creation of gems that contain C extensions. Of the gems
that I have installed which do have extensions, none of them seem to
also use hoe, so I don't really have any examples to go by. Any
suggestions for best practice when doing this sort of thing?

Hoe just sits on top of rake and generates your gemspec (and a bunch
of tasks). There isn't really anything for hoe to do for extensions
(tho suggestions are welcome). So, almost the same way you'd do it via
a plain gem:

Hoe.new('blah', Blah::VERSION) do |p|
p.spec_extras[:extensions] = ["extconf.rb"] # or whatever style
extension
end
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,274
Messages
2,571,370
Members
48,062
Latest member
leehaan

Latest Threads

Top