Resolution of the library-path mess
Daniele Nicolodi
daniele at grinta.net
Fri Oct 6 05:39:51 UTC 2017
On 05/10/17 22:51, Hal Murray via devel wrote:
>>> Warnings are easily lost in the noise. So either create the
>>> directory or treat it as an error and bail.
>
>> There are two issues with just "creating the directory":
>> 1) There's no guarantee that Python will actually use it.
>> 2) Creating the directory requires root, and it would be
>> undesirable to require that 'configure' run as root.
>
> The actual create can be deferred until the install.
>
> I don't understand the comment about "actually use it"? Is that any
> different from the case where the directory did exist?
I will repeat myself once more.
If you want a clean way to install Python modules outside the system
path (for example in /usr/local/, the default prefix directory for
NTPSec) you create a python virtual environment in /usr/local
python3 -m venv --system-site-packages --without-pip /usr/local/
and then tell waf to install the Python modules there:
waf configure --python=/usr/local/bin/python3
clean and effective.
Creating a virtual environment you (virtually) install a new interpreter
there (a few symlinks). The reason why Python does not include
/usr/local folders in his search path by default is: what if you want to
install an alternative Pythion _interpreter_ there? That would be a
nice recipe for troubles.
Cheers,
Daniele
More information about the devel
mailing list