text: Created on 2015-03-26.18:44:43 by Each, last changed 2015-04-10.01:55:51 by zyasoft.
  Because of this, for example, setuptools from bundled ensurepipe module generates unix exec files in bin, instead of exe:
  jython -m ensurepip
  jython pip install yolk
  result:
  bin\yolk file created instead of bin\yolk.exe
  reason:
  systemtools detects windows platform by checking sys.platform for 'win32', while jython sets it to 'java'.
  I was able to fix this by adding (os.name == 'java' and os._name == 'nt') everywhere in setuptools sources.
  It is huge dealbreaker for windows users who want to use others work
  I have tried this out, and it does not work per Aleksei's report:
  #!C:\jythondev\jython27\dist\bin\jython.exe
  # EASY-INSTALL-ENTRY-SCRIPT: 'yolk==0.4.3','console_scripts','yolk'
  __requires__ = 'yolk==0.4.3'
  import sys
  from pkg_resources import load_entry_point
  if __name__ == '__main__':
  sys.exit(
  load_entry_point('yolk==0.4.3', 'console_scripts', 'yolk')()
  )
  (It has to be a self executing zip archive to work on Windows.)
  Nose, for example, does install correctly on Windows. Different code path presumably.
  I have done some work here in the forked versions of pip used by Jython in If you have a patch you would like to contribute against setuptools, that would be useful and you post here.
  Next step, we should create a fork of in, which we will bundle as part of the ensurepip bundle; then we can apply, with the eventual goal of upstreaming. (This is very very slow, even for simple stuff.)
  Ok, i will prepare PR on github today
  Aleksei, I have created a fork of setuptools at, so please submit your PR there. Thanks!
  Fixed as of