or-tools 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0e0f455741da72e3a215287df4ef1858893fb31d0b4be40db6ef9ab025e339c
4
- data.tar.gz: 9291933eee08f800f48f3d83ca4f2d0fc71efb0a328134ba9667ca2ac8efb185
3
+ metadata.gz: a94dfe67ccc7166a4ab27cbf5747d332452715db7ad302fa325ef7b5b270ef12
4
+ data.tar.gz: 36aacbdbf3be07f26e8711bc0ec00d8c1ac929288c62661f7425c721eb827c5d
5
5
  SHA512:
6
- metadata.gz: 61ccc7c5f3a6c3cdf1e3dffb1ee6572d0b8cde09d4684d50353efd6f2efcb93ca4ba940343f994a3bf65992e518331bd62a02ef74ecc52f2427e12350ea7a430
7
- data.tar.gz: 589423f5b52c872b453569400ff1fd60bb1fcd3b0035e70aadbb47eedefec9b7f4187a5442893e50608529f836d2009bd77333aae3f64ce1b9d700df6fe020e7
6
+ metadata.gz: 9c66c41c7b34b75f09725bbf74c04e7d7a9c2eee5251cc294480baa9a4f8a1a0fcde3534f75f3462d69fdc7c97ec5367dac1cf5fae210351ae731c1cb3c4d5f3
7
+ data.tar.gz: c8cc4f3c87e7199f9322caa714435699e000be1888f33e2c6b1121aa72dfab1d8b10ba8100fd3ff64b6dcc43853c2b36485922cab2f3b0268ec8cddb1fe15bdc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.6.3 (2022-03-13)
2
+
3
+ - Reduced gem size
4
+
1
5
  ## 0.6.2 (2022-02-09)
2
6
 
3
7
  - Fixed segfaults with `Solver`
@@ -25,12 +25,7 @@ end
25
25
 
26
26
  $INCFLAGS << " -I#{inc}"
27
27
 
28
- $LDFLAGS << " -Wl,-rpath,#{rpath}"
29
- $LDFLAGS << " -L#{lib}"
28
+ $LDFLAGS.prepend("-Wl,-rpath,#{rpath} -L#{lib} ")
30
29
  raise "OR-Tools not found" unless have_library("ortools")
31
30
 
32
- Dir["#{lib}/libabsl_*.a"].each do |lib|
33
- $LDFLAGS << " #{lib}"
34
- end
35
-
36
31
  create_makefile("or_tools/ext")
@@ -121,12 +121,33 @@ end
121
121
  download_checksum = Digest::SHA256.file(download_path).hexdigest
122
122
  raise "Bad checksum: #{download_checksum}" if download_checksum != checksum
123
123
 
124
- # extract - can't use Gem::Package#extract_tar_gz from RubyGems
125
- # since it limits filenames to 100 characters (doesn't support UStar format)
126
124
  path = File.expand_path("../../tmp/or-tools", __dir__)
127
125
  FileUtils.mkdir_p(path)
128
- tar_args = Gem.win_platform? ? ["--force-local"] : []
129
- system "tar", "zxf", download_path, "-C", path, "--strip-components=1", *tar_args
126
+
127
+ # extract - can't use Gem::Package#extract_tar_gz from RubyGems
128
+ # since it limits filenames to 100 characters (doesn't support UStar format)
129
+ # for space, only keep licenses, include, and shared library
130
+ Dir.mktmpdir do |extract_path|
131
+ tar_args = Gem.win_platform? ? ["--force-local"] : []
132
+ system "tar", "zxf", download_path, "-C", extract_path, "--strip-components=1", *tar_args
133
+
134
+ # licenses
135
+ license_files = Dir.glob("**/*{LICENSE,LICENCE,NOTICE,COPYING,license,licence,notice,copying}*", base: extract_path)
136
+ raise "License not found" unless license_files.any?
137
+ license_files.each do |file|
138
+ FileUtils.mkdir_p(File.join(path, File.dirname(file)))
139
+ FileUtils.cp(File.join(extract_path, file), File.join(path, file))
140
+ end
141
+
142
+ # include
143
+ FileUtils.cp_r(File.join(extract_path, "include"), File.join(path, "include"))
144
+
145
+ # shared library
146
+ FileUtils.mkdir(File.join(path, "lib"))
147
+ Dir.glob("lib/libortools.{dylib,so}", base: extract_path) do |file|
148
+ FileUtils.cp(File.join(extract_path, file), File.join(path, file))
149
+ end
150
+ end
130
151
 
131
152
  # export
132
153
  $vendor_path = path
@@ -1,3 +1,3 @@
1
1
  module ORTools
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: or-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-09 00:00:00.000000000 Z
11
+ date: 2022-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rice
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 3.3.3
95
+ rubygems_version: 3.3.7
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Operations research tools for Ruby