Skip to content
Permalink
Browse files

Merge pull request #865 from fniephaus/patch-1

Compilation fixes for macOS
  • Loading branch information
timfel committed Mar 12, 2017
2 parents 09bd502 + e988aad commit 586eb57d14e035643db2b937fe6300fdf3046c7d
Showing with 12 additions and 7 deletions.
  1. +4 −2 .travis.yml
  2. +6 −3 tasks/base.py
  3. +2 −2 topaz/modules/process.py
@@ -21,8 +21,10 @@ matrix:
env: TEST_TYPE=flake8
include:
- os: osx
language: python
python: 2.7
language: generic
before_install:
# Use Pypy v5.4.0
- brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/c5a201f49c9da47d4771ebc544d10b3f9c579021/Formula/pypy.rb
env: TEST_TYPE=translate-jit
install:
- pip install requests invoke
@@ -1,13 +1,16 @@
import os

from invoke import run
import invoke


invoke.run = os.system


class BaseTest(object):
def download_mspec(self):
if not os.path.isdir("../mspec"):
run("cd .. && git clone --depth=100 --quiet https://github.com/ruby/mspec")
invoke.run("cd .. && git clone --depth=100 --quiet https://github.com/ruby/mspec")

def download_rubyspec(self):
if not os.path.isdir("../rubyspec"):
run("cd .. && git clone --depth=100 --quiet https://github.com/ruby/spec rubyspec")
invoke.run("cd .. && git clone --depth=100 --quiet https://github.com/ruby/spec rubyspec")
@@ -54,7 +54,7 @@ def setup_module(space, w_mod):
space.set_const(
w_mod,
"CLOCK_PROCESS_CPUTIME_ID",
CLOCK_PROCESS_CPUTIME_ID
space.newint(CLOCK_PROCESS_CPUTIME_ID)
)

@moduledef.function("euid")
@@ -187,7 +187,7 @@ def method_clock_gettime(self, space, clockid, args_w):
elif unit == "microsecond":
return space.newint(sec * 1000000)
elif unit == "nanosecond":
return space.newint(sec * 1000000000 + nsec)
return space.newint(sec * 1000000000 + int(nsec))
else:
raise space.error(space.w_ArgumentError,
"unexpected unit: %s" % unit

0 comments on commit 586eb57

Please sign in to comment.