[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Using hoe to create gems with C extensions

Dido Sevilla

12/28/2007 8:09:00 AM

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

1 Answer

Ryan Davis

12/28/2007 9:52:00 AM

0


On Dec 28, 2007, at 00:09 , Dido Sevilla wrote:

> 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