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

allow for --without-node and --without-emulator #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 10 additions & 4 deletions pebble-sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ def <=> (other)
end
end

depends_on 'node'
option "without-emulator", "Build without emulator support"
option "without-node", "Build without support for Pebble packages"

depends_on 'node' => :recommended
depends_on 'freetype' => :recommended
depends_on 'boost-python'

depends_on 'pebble-toolchain'
depends_on 'pebble-qemu'
depends_on 'boost-python' unless build.without? "emulator"
depends_on 'pebble-qemu' unless build.without? "emulator"

depends_on :python if MacOS.version <= :snow_leopard

Expand Down Expand Up @@ -187,7 +190,10 @@ def install
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"

%w[pypkjs backports.ssl-match-hostname colorama enum34 freetype-py gevent gevent-websocket greenlet httplib2 libpebble2 pyasn1 pyasn1-modules oauth2client peewee progressbar2 pygeoip pypng pyqrcode pyserial python-dateutil requests rsa sh six websocket-client wheel wsgiref netaddr virtualenv].each do |r|
deps = %w[pypkjs backports.ssl-match-hostname colorama enum34 freetype-py greenlet httplib2 libpebble2 pyasn1 pyasn1-modules oauth2client peewee progressbar2 pygeoip pypng pyqrcode pyserial python-dateutil requests rsa sh six websocket-client wheel wsgiref netaddr virtualenv]
# worth extracting these as they take time to compile
deps += %w[gevent gevent-websocket] unless build.without? "emulator"
deps.each do |r|
resource(r).stage { system "python", *Language::Python.setup_install_args(libexec/"vendor") }
end

Expand Down