Georgy Berdyshev wrote:
> +is_jython = sys.platform.startswith('java')
> +
> +if is_jython:
> +    import subprocess
> +
>  ws = pkg_resources.working_set
> -assert os.spawnle(
> -    os.P_WAIT, sys.executable, sys.executable,
> -    '-c', 'from setuptools.command.easy_install import main; main()',
> -    '-mqNxd', tmpeggs, 'zc.buildout',
> -    {'PYTHONPATH':
> -     ws.find(pkg_resources.Requirement.parse('setuptools')).location
> -     },
> -    ) == 0
>  
> +if is_jython:
> +    assert subprocess.Popen(
> +           [sys.executable] + ['-c', 
> +           'from setuptools.command.easy_install import main; main()',
> +           '-mqNxd', tmpeggs, 'zc.buildout'],
> +           env = dict(
> +                PYTHONPATH = 
> +                
> ws.find(pkg_resources.Requirement.parse('setuptools')).location
> +           ),
> +    ).wait() == 0
> +
> +else:
> +    assert os.spawnle(
> +        os.P_WAIT, sys.executable, sys.executable,
> +        '-c', 'from setuptools.command.easy_install import main; main()',
> +        '-mqNxd', tmpeggs, 'zc.buildout',
> +        {'PYTHONPATH':
> +        ws.find(pkg_resources.Requirement.parse('setuptools')).location
> +        },
> +        ) == 0
> +

If subprocess works on Jython, why does it *not* work on CPython?

ie: If subprocess works, why not use it everywhere.

Also, I do hope you're aware that bootstrap.py isn't "owned" by zdaemon, 
it's part of the zc.buildout project, so it seems a little odd making 
these changes to bootstrap.py here...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to