native-package-installer 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dde9205f957efd76f9694fdc3b5226ebcd9b69ad9523f91d7a72708656a884fa
4
- data.tar.gz: 205dd85c056fb1a3e2083d09a5a53f3d40782075029f9346728c7f121b07d2fa
3
+ metadata.gz: f55746d70dbe2e3afb02bae4f0025933456d4e2409da461c9f72663b254a6d4a
4
+ data.tar.gz: 66bc734383c1fc47c144f4f43116b0ff602bc9ef5e177581e7219665d489508b
5
5
  SHA512:
6
- metadata.gz: c75bdfd03e2ef20211d7fb2edff8d46da46478bcaf14fd29f80f27acdc79ce563a990fabe20a40a990e7be289e2bcfcfb3fc555f0849649da47b61c2cb52cc68
7
- data.tar.gz: cb25f859a69b0a43adfc617e2de87c03ae8299cbbe69197d4e2680583151a44ee2112aed9348a8b627a0f26d58c7147a2209beef0e47e22eb9526d47d1fb861b
6
+ metadata.gz: cde30f3ac7406c3d723e829615ba0798bc720ffd219dc1cb26c7bbceeb8d668a6d3992561dd7502d26290c050c7697d93769d979aaa1d7780ed08d3bc98376f6
7
+ data.tar.gz: 7a4535a74406e27a6eb47182742ef541f68ac71af1cc44f24aa6de355cc98863a56d504d22991d2194d869f60bbcb26ae3b41d0b469503b04caf40d0f6ab8cc2
data/doc/text/news.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # News
2
2
 
3
+ ## 1.1.6 - 2023-06-18
4
+
5
+ ### Improvements
6
+
7
+ * Added support for conda.
8
+
9
+ * Added support for Amazon Linux 2023.
10
+
3
11
  ## 1.1.5 - 2022-07-24
4
12
 
5
13
  ### Improvements
@@ -37,6 +37,10 @@ class NativePackageInstaller
37
37
  (self["ID_LIKE"] || "").split(/ /)
38
38
  end
39
39
 
40
+ def version
41
+ self["VERSION"]
42
+ end
43
+
40
44
  private
41
45
  def parse
42
46
  @variables = {}
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2022 Ruby-GNOME Project Team
1
+ # Copyright (C) 2022-2023 Ruby-GNOME Project Team
2
2
  #
3
3
  # This library is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU Lesser General Public License as published by
@@ -17,18 +17,18 @@ require_relative "red-hat-enterprise-linux"
17
17
 
18
18
  class NativePackageInstaller
19
19
  module Platform
20
- class AmazonLinux < RedHatEnterpriseLinux
20
+ class AmazonLinux2 < RedHatEnterpriseLinux
21
21
  Platform.register(self)
22
22
 
23
23
  class << self
24
24
  def current_platform?
25
25
  os_release = OSRelease.new
26
- os_release.id == "amzn"
26
+ os_release.id == "amzn" and os_release.version == "2"
27
27
  end
28
28
  end
29
29
 
30
30
  def package(spec)
31
- spec[:amazon_linux] || super
31
+ spec[:amazon_linux_2] || spec[:amazon_linux] || super
32
32
  end
33
33
 
34
34
  def install_command
@@ -0,0 +1,39 @@
1
+ # Copyright (C) 2023 Ruby-GNOME Project Team
2
+ #
3
+ # This library is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU Lesser General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ require_relative "fedora"
17
+
18
+ class NativePackageInstaller
19
+ module Platform
20
+ class AmazonLinux2023 < Fedora
21
+ Platform.register(self)
22
+
23
+ class << self
24
+ def current_platform?
25
+ os_release = OSRelease.new
26
+ os_release.id == "amzn" and os_release.version == "2023"
27
+ end
28
+ end
29
+
30
+ def package(spec)
31
+ spec[:amazon_linux_2023] || spec[:amazon_linux] || super
32
+ end
33
+
34
+ def install_command
35
+ "dnf install -y"
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,40 @@
1
+ # Copyright (C) 2023 Ruby-GNOME Project Team
2
+ #
3
+ # This library is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU Lesser General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public License
14
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ class NativePackageInstaller
17
+ module Platform
18
+ class Conda
19
+ Platform.register(self)
20
+
21
+ class << self
22
+ def current_platform?
23
+ ExecutableFinder.exist?("conda")
24
+ end
25
+ end
26
+
27
+ def package(spec)
28
+ spec[:conda]
29
+ end
30
+
31
+ def install_command
32
+ "conda install -c conda-forge"
33
+ end
34
+
35
+ def need_super_user_priviledge?
36
+ false
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021 Ruby-GNOME Project Team
1
+ # Copyright (C) 2021-2023 Ruby-GNOME Project Team
2
2
  #
3
3
  # This library is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU Lesser General Public License as published by
@@ -21,7 +21,7 @@ class NativePackageInstaller
21
21
  class << self
22
22
  def current_platform?
23
23
  os_release = OSRelease.new
24
- os_release.id == "fedora"
24
+ os_release.id == "fedora" or os_release.id_like.include?("fedora")
25
25
  end
26
26
  end
27
27
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2017-2022 Ruby-GNOME Project Team
1
+ # Copyright (C) 2017-2023 Ruby-GNOME Project Team
2
2
  #
3
3
  # This library is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU Lesser General Public License as published by
@@ -32,12 +32,9 @@ class NativePackageInstaller
32
32
  end
33
33
  end
34
34
 
35
-
36
35
  # macOS
37
36
  require_relative "platform/macports"
38
37
 
39
- require_relative "platform/homebrew"
40
-
41
38
 
42
39
  # FreeBSD
43
40
  require_relative "platform/freebsd"
@@ -53,9 +50,10 @@ require_relative "platform/alt-linux"
53
50
 
54
51
  require_relative "platform/pld-linux"
55
52
 
56
- require_relative "platform/red-hat-enterprise-linux"
57
- require_relative "platform/amazon-linux"
58
53
  require_relative "platform/fedora"
54
+ require_relative "platform/red-hat-enterprise-linux"
55
+ require_relative "platform/amazon-linux-2"
56
+ require_relative "platform/amazon-linux-2023"
59
57
 
60
58
  require_relative "platform/suse"
61
59
 
@@ -64,5 +62,10 @@ require_relative "platform/suse"
64
62
  require_relative "platform/msys2"
65
63
 
66
64
 
65
+ # Platform independent
66
+ require_relative "platform/homebrew"
67
+ require_relative "platform/conda"
68
+
69
+
67
70
  # Fallback
68
71
  require_relative "platform/unknown"
@@ -14,5 +14,5 @@
14
14
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
16
  class NativePackageInstaller
17
- VERSION = "1.1.5"
17
+ VERSION = "1.1.6"
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: native-package-installer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-24 00:00:00.000000000 Z
11
+ date: 2023-06-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Users need to install native packages to install an extension library
@@ -34,8 +34,10 @@ files:
34
34
  - lib/native-package-installer/os-release.rb
35
35
  - lib/native-package-installer/platform.rb
36
36
  - lib/native-package-installer/platform/alt-linux.rb
37
- - lib/native-package-installer/platform/amazon-linux.rb
37
+ - lib/native-package-installer/platform/amazon-linux-2.rb
38
+ - lib/native-package-installer/platform/amazon-linux-2023.rb
38
39
  - lib/native-package-installer/platform/arch-linux.rb
40
+ - lib/native-package-installer/platform/conda.rb
39
41
  - lib/native-package-installer/platform/debian.rb
40
42
  - lib/native-package-installer/platform/fedora.rb
41
43
  - lib/native-package-installer/platform/freebsd.rb
@@ -53,7 +55,7 @@ homepage: https://github.com/ruby-gnome/native-package-installer
53
55
  licenses:
54
56
  - LGPL-3+
55
57
  metadata: {}
56
- post_install_message:
58
+ post_install_message:
57
59
  rdoc_options: []
58
60
  require_paths:
59
61
  - lib
@@ -68,8 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
70
  - !ruby/object:Gem::Version
69
71
  version: '0'
70
72
  requirements: []
71
- rubygems_version: 3.4.0.dev
72
- signing_key:
73
+ rubygems_version: 3.5.0.dev
74
+ signing_key:
73
75
  specification_version: 4
74
76
  summary: native-package-installer helps to install native packages on "gem install"
75
77
  test_files: []