Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rubygems-requirements-system to install system dependencies automatically #369

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:

- name: Install IRuby gem
run: |
sudo apt update # Preparation for Native Package Installer
gem install rubygems-requirements-system
gem install pkg/*.gem

- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:

- run: rake build

- run: gem install pkg/*.gem
- run: gem install rubygems-requirements-system pkg/*.gem

- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
env:
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
source 'https://rubygems.org'

plugin 'rubygems-requirements-system'

gemspec

group :pry do
Expand Down
20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,34 +40,24 @@ See the official document to know how to install Jupyter Notebook and/or Jupyter

### Ubuntu

#### Ubuntu 17+
#### Ubuntu 22.04+

```shell
sudo apt install libtool libffi-dev ruby ruby-dev make

gem install --user-install iruby
iruby register --force
```

#### Ubuntu 16

The latest IRuby requires Ruby >= 2.4 while Ubuntu's official Ruby package is version 2.3.
So you need to install Ruby >= 2.4 by yourself before preparing IRuby.
We recommend to use rbenv.

```shell
sudo apt install libtool libffi-dev ruby ruby-dev make
gem install --user-install rubygems-requirements-system
gem install --user-install iruby
iruby register --force
```

### Fedora

#### Fedora 36
#### Fedora 40+

```shell
sudo dnf install ruby ruby-dev make zeromq-devel

gem install --user-install rubygems-requirements-system
gem install --user-install iruby
iruby register --force
```
Expand All @@ -89,6 +79,7 @@ Install Jupyter.
#### Homebrew

```shell
gem install rubygems-requirements-system
gem install iruby
iruby register --force
```
Expand All @@ -99,6 +90,7 @@ If you are using macports, run the following commands.

```shell
port install libtool autoconf automake autogen
gem install rubygems-requirements-system
gem install iruby
iruby register --force
```
Expand Down
19 changes: 0 additions & 19 deletions ext/Rakefile

This file was deleted.

12 changes: 10 additions & 2 deletions iruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Gem::Specification.new do |s|
s.executables = %w[iruby]
s.test_files = s.files.grep(%r{^test/})
s.require_paths = %w[lib]
s.extensions = %w[ext/Rakefile]

s.required_ruby_version = '>= 2.3.0'

Expand All @@ -25,12 +24,21 @@ Gem::Specification.new do |s|
s.add_dependency 'logger'
s.add_dependency 'mime-types', '>= 3.3.1'
s.add_dependency 'multi_json', '~> 1.11'
s.add_dependency 'native-package-installer'

s.add_development_dependency 'pycall', '>= 1.2.1'
s.add_development_dependency 'rake'
s.add_development_dependency 'test-unit'
s.add_development_dependency 'test-unit-rr'

[
['arch_linux', 'zeromq'],
['debian', 'libzmq3-dev'],
['freebsd', 'libzmq4'],
['homebrew', 'zmq'],
['macports', 'zmq'],
].each do |platform, package|
s.requirements << "system: libzmq: #{platform}: #{package}"
end

s.metadata['msys2_mingw_dependencies'] = 'zeromq'
end
Loading