-
Notifications
You must be signed in to change notification settings - Fork 74
avoid duplicate install of bin/offlineimap #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
fixes install with newer versions of tools, which otherwise fails with `FileExistsError: File already exists` in installer/destinations.py write_file (duplicate install in pyproject.toml [project scripts]). I think this is the "Finally, the `bin/offlineimap` command is not used, so we probably can remove it" referred to in 4f5b252 (which wasn't done at the time but now seems to be required).
|
@sthen installation seems to work fine for me: # cd "$(mktemp -d)"
# python3 -m venv venv
# source venv/bin/activate
# pip install git+https://github.com/OfflineIMAP/offlineimap3@master
# offlineimap --version
8.0.1How can I reproduce the issue that you are facing? |
|
From a checkout or unpacked tar: |
|
@sthen thanks! I confirm the symptom for: # python3 -m installer -d "$(mktemp -d)" dist/offlineimap-8.0.1-py3-none-any.whl |& tail -n1
FileExistsError: File already exists: /tmp/tmp.5UOY2Lvp4L/tmp/tmp.GmDCDphhPa/venv/bin/offlineimapI hadn't heard of installer prior to this and its latest release is more than 2 years old. Is it still relevant? Why does it fail like this? Is the bug in installer or in offlineimap3? I don't see any competing entry points in |
|
installer is still relevant - it's the tool commonly used by various OS packaging systems to install a wheel from a file on disk into a staging directory. It's used partly because it's much simpler than pip, partly because until the very latest version (released this week), pip used setuptools to build, resulting in a bootstrap problem where it's easy to introduce dependency loops. I guess there aren't many releases partly because it's simple so they aren't needed often, and partly because any changed behaviour is likely to cause big problems for OS packaging. The issue here is that offlineimap is asking for the script to be installed from two different places - once from this 'script' with the file coming from bin/offlineimap - the other from [project.scripts] in pyproject.toml. If the wheel is installed using pip then it silently uses its own generated script, not the one from bin/ in the offlineimap distribution. Rather than doing this, installer is erroring out rather than silently overwriting. This is the only case I've seen of this in OpenBSD ports in ~1300 packages that are built using installer. |
|
@sthen thanks for elaborating! So there is a competing |
|
I don't know what the best fix is. |
fixes install with newer versions of tools, which otherwise fails with
FileExistsError: File already existsin installer/destinations.py write_file (duplicate install in pyproject.toml [project scripts]). I think this is the "Finally, thebin/offlineimapcommand is not used, so we probably can remove it" referred to in 4f5b252 (which wasn't done at the time but now seems to be required).This PR
References
Additional information