pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/56774: Python 3.9 & 3.10 build fails with pkgsrc-2022Q1 on NetBSD-current on RPi4
The following reply was made to PR pkg/56774; it has been noted by GNATS.
From: Pierre Pronchery <khorben%defora.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: Malte Dehling <mdehling%gmail.com@localhost>,
Tobias Nygren <tnn%netbsd.org@localhost>
Subject: Re: pkg/56774: Python 3.9 & 3.10 build fails with pkgsrc-2022Q1 on
NetBSD-current on RPi4
Date: Wed, 6 Jul 2022 02:33:09 +0200
--Apple-Mail=_3DBB6D82-D39B-4C5F-A601-28EC55487025
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
Hi Malte, (Tobias)
Thank you for reporting this issue. I have ran into the same problem on =
macOS/amd64, with an unprivileged build, and managed to find the issue.
It is due to a patch specific to pkgsrc, which modifies setup.py by =
adding the following line:
> sys.path =3D [p for p in sys.path if not re.compile('^' + =
sys.base_prefix + '/').match(p)]
Unfortunately this effectively empties sys.path on setups where the work =
directory is a subfolder of the destination prefix (as is the case in =
your setup and in mine).
In practice this prevents Python from finding its own modules during the =
build, triggering the error you reported.
I am not aware of a better patch than simply removing this line from =
setup.py at the moment.
@Tobias: any ideas?
HTH,
--=20
khorben=
--Apple-Mail=_3DBB6D82-D39B-4C5F-A601-28EC55487025
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=us-ascii
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><span=
class=3D"Apple-tab-span" style=3D"white-space:pre"> =
</span>Hi Malte, (Tobias)<div class=3D""><br class=3D""></div><div =
class=3D"">Thank you for reporting this issue. I have ran into the same =
problem on macOS/amd64, with an unprivileged build, and managed to find =
the issue.</div><div class=3D""><br class=3D""></div><div class=3D"">It =
is due to a patch specific to pkgsrc, which modifies setup.py by adding =
the following line:</div><div class=3D""><br class=3D""></div><div =
class=3D""><blockquote type=3D"cite" class=3D""><span class=3D"" =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">sys.path =3D =
[p for p in sys.path if not re.compile('^' + sys.base_prefix + =
'/').match(p)]</span><br class=3D"" style=3D"caret-color: rgb(0, 0, 0); =
color: rgb(0, 0, 0);"></blockquote></div><div class=3D""><span class=3D"" =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br =
class=3D""></span></div><div class=3D""><span class=3D"" =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Unfortunately =
this effectively empties sys.path on setups where the work directory is =
a subfolder of the destination prefix (as is the case in your setup and =
in mine).</span></div><div class=3D""><span class=3D"" =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">In practice =
this prevents Python from finding its own modules during the build, =
triggering the error you reported.</span></div><div class=3D""><span =
class=3D"" style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br =
class=3D""></span></div><div class=3D""><span class=3D"" =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">I am not aware =
of a better patch than simply removing this line from setup.py at the =
moment.</span></div><div class=3D""><br class=3D""></div><div =
class=3D"">@Tobias: any ideas?</div><div class=3D""><br =
class=3D""></div><div class=3D"">HTH,<br class=3D""><div class=3D"">
<meta charset=3D"UTF-8" class=3D""><div dir=3D"auto" style=3D"caret-color:=
rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;" =
class=3D""><div>-- </div><div>khorben</div></div></div></div></body><=
/html>=
--Apple-Mail=_3DBB6D82-D39B-4C5F-A601-28EC55487025--
Home |
Main Index |
Thread Index |
Old Index