Skip to content
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

Specify bdist temp folder for WSL compatibility #31002

Closed
tobiasdiez opened this issue Dec 4, 2020 · 24 comments
Closed

Specify bdist temp folder for WSL compatibility #31002

tobiasdiez opened this issue Dec 4, 2020 · 24 comments

Comments

@tobiasdiez
Copy link
Contributor

On WSL, bdist_wheel sometimes encounters strange permission errors (when the source folder is a Windows folder mounted in WSL), see pypa/packaging-problems#258. In the linked issue, a solution is described by changing the permissions for authenticated users, but it didn't work for me. Thus I've implemented the workaround mentioned in pypa/packaging-problems#258 (comment) and specified an explicit bdist directory in the Linux system.

CC: @mkoeppe

Component: build

Keywords: sd111

Author: Tobias Diez, Matthias Koeppe

Branch/Commit: fb10429

Reviewer: Matthias Koeppe, Tobias Diez

Issue created by migration from https://trac.sagemath.org/ticket/31002

@tobiasdiez tobiasdiez added this to the sage-9.3 milestone Dec 4, 2020
@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 4, 2020

comment:2

Thanks for tracking down this problem.

I don't think using ~/temp/ is a good idea, though.
I think a better solution would be to use the command mktemp -d to create a directory in the system directory for temporary files.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 5, 2020

Changed commit from a8e0364 to a3077c7

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 5, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

a3077c7Use mktemp

@tobiasdiez
Copy link
Contributor Author

comment:4

ok done

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 5, 2020

comment:5

The temporary directory should probably be removed afterwards...

Probably best to create a new function sdh_setup_bdist_wheel in build/bin/sage-dist-helpers for that

@tobiasdiez
Copy link
Contributor Author

comment:6

Unless --keep-temp is specified, the bdist directory is cleaned up anyway. https://setuptools.readthedocs.io/en/latest/userguide/commands.html#bdist-egg-create-a-python-egg-for-the-project

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 5, 2020

comment:7

But the directory is not removed as far as I can see

@tobiasdiez
Copy link
Contributor Author

comment:8

Replying to @mkoeppe:

But the directory is not removed as far as I can see

Probably. If you think this is a problem, I would like to ask you to implement your suggestion with the sage-dist-helpers. My shell knowledge is sadly not good enough for this.

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 5, 2020

comment:9

OK, will do

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 5, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

c5a14a3build/bin/sage-dist-helpers (sdh_setup_bdist_wheel): New

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 5, 2020

Changed commit from a3077c7 to c5a14a3

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 5, 2020

comment:11

Replying to @mkoeppe:

But the directory is not removed as far as I can see

Actually I was wrong about this

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 5, 2020

comment:12

Replying to @tobiasdiez:

I would like to ask you to implement your suggestion with the sage-dist-helpers.

Nevertheless I have implemented this function. Better to have it in one place.

I have only changed it in the pillow install script, where it seems to work.

Could you change the other ones?

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 6, 2020

comment:13

Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 6, 2020

Changed keywords from none to sd111

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 7, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

fb10429build/pkgs/*/spkg-install.in: Use new function sdh_setup_bdist_wheel

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 7, 2020

Changed commit from c5a14a3 to fb10429

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 7, 2020

Reviewer: Matthias Koeppe, ...

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 7, 2020

Changed author from Tobias Diez to Tobias Diez, Matthias Koeppe

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 7, 2020

comment:15

Changed the remaining ones.

@tobiasdiez
Copy link
Contributor Author

comment:16

Thanks! LGTM

@tobiasdiez
Copy link
Contributor Author

Changed reviewer from Matthias Koeppe, ... to Matthias Koeppe, Tobias Diez

@slel

This comment has been minimized.

@vbraun
Copy link
Member

vbraun commented Dec 13, 2020

Changed branch from public/build/bdist_wsl to fb10429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants