Opened 2 years ago

Last modified 2 years ago

#31002 closed enhancement

Specify bdist temp folder for WSL compatibility — at Version 17

Reported by: Tobias Diez Owned by:
Priority: critical Milestone: sage-9.3
Component: build Keywords: sd111
Cc: Matthias Köppe Merged in:
Authors: Tobias Diez, Matthias Koeppe Reviewers: Matthias Koeppe, Tobias Diez
Report Upstream: N/A Work issues:
Branch: public/build/bdist_wsl (Commits, GitHub, GitLab) Commit: fb10429b974d649741c67077ed50a00815880932
Dependencies: Stopgaps:

Status badges

Description (last modified by Samuel Lelièvre)

On WSL, bdist_wheel sometimes encounters strange permission errors (when the source folder is a Windows folder mounted in WSL), see https://github.com/pypa/packaging-problems/issues/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 https://github.com/pypa/packaging-problems/issues/258#issuecomment-548148041 and specified an explicit bdist directory in the Linux system.

Change History (17)

comment:1 Changed 2 years ago by Tobias Diez

Status: newneeds_review

comment:2 Changed 2 years ago by Matthias Köppe

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.

comment:3 Changed 2 years ago by git

Commit: a8e0364dc6ff16a799b64670e75f05a4dfac3b1ea3077c71f488ddb2b6fe4058cbbc981d02d7ba95

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

a3077c7Use mktemp

comment:4 Changed 2 years ago by Tobias Diez

ok done

comment:5 Changed 2 years ago by Matthias Köppe

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

comment:6 Changed 2 years ago by Tobias Diez

comment:7 Changed 2 years ago by Matthias Köppe

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

comment:8 in reply to:  7 ; Changed 2 years ago by Tobias Diez

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.

comment:9 Changed 2 years ago by Matthias Köppe

Status: needs_reviewneeds_work

OK, will do

comment:10 Changed 2 years ago by git

Commit: a3077c71f488ddb2b6fe4058cbbc981d02d7ba95c5a14a396fd1f1cd2de0d6fd465e546b7ff0b33b

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

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

comment:11 in reply to:  7 Changed 2 years ago by Matthias Köppe

Replying to mkoeppe:

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

Actually I was wrong about this

comment:12 in reply to:  8 Changed 2 years ago by Matthias Köppe

Replying to gh-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?

comment:13 Changed 2 years ago by Matthias Köppe

Keywords: sd111 added

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

comment:14 Changed 2 years ago by git

Commit: c5a14a396fd1f1cd2de0d6fd465e546b7ff0b33bfb10429b974d649741c67077ed50a00815880932

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

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

comment:15 Changed 2 years ago by Matthias Köppe

Authors: Tobias DiezTobias Diez, Matthias Koeppe
Reviewers: Matthias Koeppe, ...
Status: needs_workneeds_review

Changed the remaining ones.

comment:16 Changed 2 years ago by Tobias Diez

Reviewers: Matthias Koeppe, ...Matthias Koeppe, Tobias Diez
Status: needs_reviewpositive_review

Thanks! LGTM

comment:17 Changed 2 years ago by Samuel Lelièvre

Description: modified (diff)
Note: See TracTickets for help on using tickets.