How can I specify, to a PEP 517 conformant installer, the directories where libraries and scripts should be installed?
Deprecated Setuptools installer does it right
Using python3 -m setup install --install-lib=/usr/share/foo/ --install-scripts=/usr/share/bar/
, I can specify the installation location for Python libraries and executable programs.
$ python3 -m setup install --help
[…]
Options for 'install' command:
[…]
--install-lib installation directory for all module
distributions (overrides --install-
purelib and --install-platlib)
[…]
--install-scripts installation directory for Python
scripts
[…]
This is good, when installing a self-contained application; the program files should end up in a location appropriate to the operating system, and the libraries should be installed in an application-private directory because they're not for general import by other Python programs.
The Setuptools project has deprecated the setup install
feature, so we need to find a replacement for this.
PEP-517 tools to do this?
The current simple 'build' tool (“A simple, correct Python build frontend”) apparently does not have corresponding options to specify the installation directories that way.
Need a direct replacement for --install-lib
and --install-scripts
I want to migrate away from deprecated setup install
, to a PEP-517 build system.
But I need (for some applications) to be able to specify the install location of library modules, and of console scripts. Just like with the old --install-lib
and --install-scripts
options.
How do I instruct 'build' to do this? Or, what other PEP-517 conformant installation tool lets me do this?