Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ruby and Python: Packaging and Environment

Ruby and Python: Packaging and Environment

Ruby and Python are similar languages, but have different approaches to packaging, language runtime switching and dependency management. This talk provides an overview the similarities and differences.

Jimmy Cuadra

July 10, 2014
Tweet

More Decks by Jimmy Cuadra

Other Decks in Programming

Transcript

  1. $ pip search flask Flask - A microframework based on

    Werkzeug, Jinja2 and good intentions clay-flask - Clay is a framework for building RESTful backend services using best practices. Flask-RESTful - Simple framework for creating REST APIs P Y T H O N
  2. $ pip install Flask Downloading/unpacking Flask Downloading Flask-0.10.1.whl (115kB): 115kB

    downloaded ! ... ! Successfully installed flask itsdangerous Werkzeug Jinja2 markupsafe Cleaning up... P Y T H O N
  3. R U B Y # my_gem.gemspec Gem::Specification.new do |spec| spec.name

    = “my_gem” spec.version = “1.0.0” spec.description = “Does stuff!” end
  4. R U B Y $ gem search rails ! ***

    REMOTE GEMS *** ! rails (4.1.4) rails-api (0.2.1) rails_admin (0.6.2) ...
  5. R U B Y $ gem install rails ! Fetching:

    thread_safe-0.3.4.gem (100%) Successfully installed thread_safe-0.3.4 ... Fetching: sprockets-2.12.1.gem (100%) Successfully installed sprockets-2.12.1 Fetching: sprockets-rails-2.1.3.gem (100%) Successfully installed sprockets-rails-2.1.3 Fetching: rails-4.1.4.gem (100%)
  6. R U B Y # Gemfile source 'https://rubygems.org' ! gem

    'rails' ! group :test do gem 'rspec' end
  7. R U B Y $ bundle Fetching gem metadata from

    https://rubygems.org/......... Fetching additional metadata from https://rubygems.org/.. Resolving dependencies... Installing rake 10.3.2 Installing i18n 0.6.11 ... Installing rails 4.1.4 Installing rspec 3.0.0 Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
  8. R U B Y # Gemfile.lock GEM remote: https://rubygems.org/ specs:

    rails (4.1.4) actionmailer (= 4.1.4) actionpack (= 4.1.4) ... railties (= 4.1.4) sprockets-rails (~> 2.0) rspec (3.0.0) rspec-core (~> 3.0.0) rspec-expectations (~> 3.0.0) rspec-mocks (~> 3.0.0)
  9. R U B Y # Gemfile source 'https://rubygems.org' ! gem

    ‘rails’, ‘~> 4.0.5’ ! group :test do gem 'rspec' end
  10. setuptools + pip pip virtualenv R U B Y RubyGems

    Bundler rbenv + Bundler P Y T H O N