On 2020-11-12 10:56:45 +1100, Chris Angelico wrote: > On Thu, Nov 12, 2020 at 10:44 AM Dan Stromberg <[email protected]> wrote: > > I do get a .../bin/backshift though, which is a bash script that > > knows how to start up python on the main module. So the user need > > not source something at install time or at run time. > > > > The install process is ./configure and make install, where > > ./configure is Not autoconf, but acts sort of like an autoconf > > script. > > > > Ah, fair enough. > > Did you know that, with a vanilla venv, you can actually just run a > Python interpreter from within there, without sourcing anything? Very > handy for automated scripts.
This also works with the Python interpreter in the shebang line.
So if your "make install" for "mytool" creates a venv in
/usr/local/lib/mytool/venv and then replaces the shebang in
/usr/local/bin/mytool with "#!/usr/local/lib/mytool/venv/python", the
user can just invoke "mytool" without caring about the virtual
environment.
If you do that for every Python script, size may be a problem, though: I
just checked a few of my venvs, and they are between 13 and 418 MB:
Average 81 MB.
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | [email protected] | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman/listinfo/python-list
