ruby-numo / numo-linalg

Linear Algebra Library for Ruby/Numo::NArray
BSD 3-Clause "New" or "Revised" License
38 stars 9 forks source link

Add rake-compiler to make build easier #37

Closed yoshoku closed 3 years ago

yoshoku commented 3 years ago

I would like to add rake-compiler gem to make the build easy like Numo::NArray. By merging this pull request, native extensions can be built with rake command:

$ bundle exec rake compile
mkdir -p tmp/x86_64-darwin20/numo/linalg/blas/3.0.0/numo/linalg
cd tmp/x86_64-darwin20/numo/linalg/blas/3.0.0
/Users/foo/.anyenv/envs/rbenv/versions/3.0.0/bin/ruby -I. ../../../../../../ext/numo/linalg/blas/extconf.rb
checking for numo/narray.h... yes
...

This changes do not affect the gem creation with the previous method:

$ bundle exec rake build
numo-linalg 0.1.5 built to pkg/numo-linalg-0.1.5.gem.

$ gem install pkg/numo-linalg-0.1.5.gem
Building native extensions. This could take a while...
Successfully installed numo-linalg-0.1.5
Parsing documentation for numo-linalg-0.1.5
Done installing documentation for numo-linalg after 7 seconds
1 gem installed

I hope you will consider it for improving developer experience.