Commit 4b12310e authored by French, Robert's avatar French, Robert
Browse files

Docs, better platform detection

parent f53b7f29
Loading
Loading
Loading
Loading
Loading
+26 −8
Original line number Diff line number Diff line
@@ -13,13 +13,31 @@ class BreakTasks(object):
  
  @belhorn_property
  def CC(self):
    return self.platform.CC

  @belhorn_property
  def platform(self):
    p = detect_platform()
    announce_platform(p)
    return p

class Platform(object):
  CC = None
  name = None

class Mac(Platform):
  name = "Mac OS X"
  CC = which("c++")

class Linux(Platform):
  name = "Linux"
  CC = which("CC")

def detect_platform():
  if platform.system() == 'Linux':
      return self._linux_cc()
    return Linux()
  else:
      return self._mac_cc()

  def _linux_cc(self):
    return which("CC")
    return Mac()

  def _mac_cc(self):
    return which("c++")
def announce_platform(p):
  log.info("Platform... %s" % p.name)
+4 −0
Original line number Diff line number Diff line
Paratosthenes
=============

Parallel Sieve of Eratosthenes.