Make basic C builds work on Windows without Cygwin

Bug #1216448 reported by Matt Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raise
Fix Released
Critical
Unassigned

Bug Description

Make it work on Windows. Make sure it does not need the Cygwin/Mingw stuff installed or in the path to work.

It will need to have pure python replacements for commands such as 'which', 'locate', 'whoami', 'grep', et cetera

Revision history for this message
Matt Jones (workhorsy) wrote : Re: Make it work on Windows without Cygwin

Something like this can be used for 'which':
def which(name):
 result = []
 exts = filter(None, os.environ.get('PATHEXT', '').split(os.pathsep))
 path = os.environ.get('PATH', None)
 if path is None:
  return []
 for p in os.environ.get('PATH', '').split(os.pathsep):
  p = os.path.join(p, name)
  print(p)
  if os.access(p, os.X_OK):
   result.append(p)
  for e in exts:
   pext = p + e
   if os.access(pext, os.X_OK):
    result.append(pext)
 return result

summary: - Make it work on Windows
+ Make it work on Windows without Cygwin
Changed in raise:
importance: High → Critical
description: updated
Matt Jones (workhorsy)
summary: - Make it work on Windows without Cygwin
+ Make basic C builds work on Windows without Cygwin
Revision history for this message
Matt Jones (workhorsy) wrote :
Changed in raise:
status: Confirmed → Fix Committed
Matt Jones (workhorsy)
Changed in raise:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.