Skip to content

Operation not permitted while trying hard linking #516

Closed
@ghost

Description

Originally reported by: sorin (Bitbucket: sorin, GitHub: sorin)


It seems that even current versions of setuptools to fail ugly when os.link cannot be performed, and this seems to be something more and more common, especially due to the virtualisation.

Hard links are not supported in many network mounts and virtual environments. In my case I am using Parallels to share my home directory which also contains the python modules which I am developing, allowing me to run the same code on OS X, Ubuntu and Windows.

It seems that doing python setup.py sdist fails with the (in)famous error:

hard linking README.txt -> foo-0.1
error: Operation not permitted

Based on the thread from http://www.itsprite.com/pythonpython-setup-py-sdist-error-operation-not-permitted/ I tried to add del os.link to my setup.py and it started to work.

While this workaround seems ugly, it seems that's the only one that covers all failure cases.

Problem reproduces with both 5.5.x and 20.x versions of setuptools.


Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions