Comment 5 for bug 984971

Revision history for this message
Hanno Schlichting (hannosch) wrote :

Note that with Python 3.3, Python has a native implementation for symlinks on Windows, so os.symlink works on all platforms. Maybe you could backport this implementation to older Python versions instead. The code is in posixmodule.c at http://hg.python.org/cpython/file/0f837071fd97/Modules/posixmodule.c#l6494

I'd suggest you create a small package with just the Windows symlink code in it, and let c.r.omelette use that via a dependency. That way you can also make the dependency conditional on the target platform in omelette's setup.py, like:

import sys

additional_install_requires = []

if sys.platform[:3].lower() == "win":
    additional_install_requires += ['windows_symlink_project_name']

setup(name='collective.recipe.omelette',
    ...
    install_requires=[
        ...,
    ] + additional_install_requires,
)