<swills>
basically i'm extracting the gem, pulling the yaml out of the metadata and trying to build
<swills>
(you can see the do-extract target a few lines up...)
<swills>
unless i'm misunderstanding tho, there's no way to build a gem using just the contents of the .gem file, because the ruby .gemspec isn't included any more
<swills>
qrush: simply removing the ~> in all cases may not make sense. if the gem is semver compliant, then you could simply say that if the version is >= 1.0.0, then simply use >= 1.x (or whatever the current major version is) and if it's 0.x.x then ~> is OK (for the semver case). but if the gem is not semver compliant, then it's hard to say what is correct and perhaps there ~> is correct.
<swills>
too many "simply"'s in that sentence, heh
<swills>
i'm tired and sick, sorry
<drbrain>
how about, for extracting the gemspecs:
<drbrain>
gem spec --ruby the_gem-version.gem
<drbrain>
it seems like you run gem elsewhere
<swills>
drbrain: would that use the network at all?
<drbrain>
no
<swills>
sounds like it should work, let me give it a try, thanks
robertt_dex has joined #rubygems
<drbrain>
cool
<swills>
seems like it's working
<drbrain>
<swills>
thx
<swills>
do you happen to know is there a way to clean up the intermedia build stuff generated during gem build?
<swills>
like if you have C extensions you'll have .o files, etc
<swills>
right now i am packaging all those up...
<drbrain>
a make clean from the directory should do it
<swills>
which doesn't hurt but is a waste of space
<swills>
will that delete the built gem too?
<drbrain>
I'm not sure
<drbrain>
rubygems doesn't do this because I'm too afraid to break some random gem
<drbrain>
also, the gem spec --ruby should be more future proof as it can clean up busted yaml (from syck) or future busted yaml for whatever reason
<swills>
fair enough
<swills>
that's cool
<drbrain>
… newer rubygems builds in a temp dir I think
<drbrain>
I'll need to go reread the code
<drbrain>
then the make install puts the .so in the right spot
<swills>
i have had "gem build --force" for a while
<swills>
i think i am going to try removing the --force and see what breaks...
elia has quit [Quit: Computer has gone to sleep.]
<swills>
drbrain: what is the build_info dir for?
<drbrain>
I don't think you care about it
<drbrain>
it records the arguments for building C extensions so they can be rebuilt when you `gem pristine`
<drbrain>
gem install mysql -- --with-mysql-dir=/opt/local/custom_mysql
<drbrain>
for example
<swills>
gotcha
<swills>
any way to avoid having it installed?
<drbrain>
via gem install, no, but if you rm it before moving files into place rubygems won't care
<swills>
k
<swills>
reminds me of the .packlist files from perl, heh
<swills>
hmm, an "extensions" subdirectory...
<swills>
i'm guessing the install location for C extensions changed?
dangerousdave has joined #rubygems
dangerousdave has quit [Client Quit]
huoxito has quit [Remote host closed the connection]