Preparing for a point release
Richard Laager
rlaager at wiktel.com
Fri Dec 8 06:10:27 UTC 2017
On 12/07/2017 10:59 PM, Gary E. Miller wrote:
>> The default case is prefix=/usr/local, which (correct me if I'm wrong)
>> works without hacks.
>
> Sadly, recently broken.
NTPsec has wafhelpers/fix_python_config.py, which is the hack in question.
Have you tried the patch I posted to #414, which removes
wafhelpers/fix_python_config.py entirely?
Here is a direct link:
https://gitlab.com/NTPsec/ntpsec/uploads/6d9e985a21558b42f324ef0e85f660e0/python-config.patch
What is broken with that patch?
Or in other words, what was broken originally to spur the creation of
wafhelpers/fix_python_config.py?
Fred Wright's position is that it is better to "us[e] a location that
actually works over using a location that honors PREFIX". From this
premise comes wafhelpers/fix_python_config.py, which I suspect is
responsible for the problem you are reporting.
With the wafhelpers/fix_python_config.py hack removed, I get correct
results for these scenarios:
./waf configure --prefix=/usr/local
./waf configure --prefix=/usr
./waf configure --prefix=/home/rlaager/.local
By correct, I mean these are true:
1) The calculated PYTHONDIR and PYTHONARCHDIR are under PREFIX.
2) Those values are in sys.path.
If I do this:
./waf configure --prefix=foo
#1 still holds. #2 is moot, as `pwd`/foo, or any other non-standard
path, is never going to be in sys.path.
Fred Wright's position is that, in this scenario, I should not get a
PYTHONDIR under `pwd`/foo, because it does not exist in sys.path.
Instead, I should get some option out of sys.path. This is the behavior
I get with current NTPsec HEAD. This behavior is because of
wafhelpers/fix_python_config.py. It sets PYTHONDIR to
/usr/lib/python2.7/dist-packages, which is obviously not under `pwd`/foo.
> I always used PYTHONPATH.
Just to be clear, is there a PYTHONPATH set in your environment at the
time you run `waf configure`? If so, what is it set to? Have you tried
unsetting it?
> Look at all Debian derivatives. Now we got 4 possible ultimate
> destinations, and I'm not exactly sure I got it exactly right:
You don't have this right, and I've already explained why in a previous
message. In any event, I have already packaged and uploaded ntpsec for
Debian. Debian packaging is a solved problem.
>> The distro-packaging case is to install to /usr, which (correct me if
>> I'm wrong) works without hacks. For this case, keep in mind that the
>> final install location is /usr, but prefix is a temporary directory.
I was wrong when I said this. The correct approach is: --prefix=/usr
--destdir=some_temp_dir
NTPsec's `waf configure --destdir` seems broken. That should be fixed,
especially if helping packagers is a priority.
--
Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20171208/93da4f1d/attachment.bin>
More information about the devel
mailing list