File: Rakefile

package info (click to toggle)
ruby-netcdf 0.7.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,208 kB
  • sloc: ansic: 4,058; ruby: 1,743; makefile: 14; csh: 6
file content (37 lines) | stat: -rw-r--r-- 1,004 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -* coding: utf-8 -*-
require 'rake/testtask'
require 'rake/extensiontask'
require 'rake/packagetask'
begin
  require 'bundler/gem_helper'  # instead of 'bundler/gem_tasks' -> need manual
                                # calls of install_tasks (see below)
rescue LoadError
  puts 'If you want to create gem, You must install Bundler'
end

# manual calls of install_tasks to support multiple gemspec files
Bundler::GemHelper.install_tasks(name: "ruby-netcdf")
#Bundler::GemHelper.install_tasks(name: "ruby-netcdf-bigmem")

require './lib/numru/netcdf/version'
def version
  NumRu::NetCDF::VERSION
end

task :default => :test
task :test => :compile
Rake::TestTask.new do |t|
  t.libs << 'lib' << 'test'
  t.test_files = FileList['test/*.rb']
end

Rake::ExtensionTask.new do |ext|
  ext.name = 'netcdfraw'
  ext.ext_dir = 'ext/numru'
  ext.lib_dir = 'lib/numru'
end

Rake::PackageTask.new('ruby-netcdf', "#{version}") do |t|
  t.need_tar_gz = true
  t.package_files.include `git ls-files`.split("\n")
end