build: RFE: non-wheel otput and do not generate sdist archive optioons
Looks like build is not able build to non-wheel output.
build --help
[tkloczko@barrel rich-10.4.0]$ /usr/bin/python3 -m build --help
usage: python -m build [-h] [--version] [--sdist] [--wheel] [--outdir OUTDIR] [--skip-dependency-check] [--no-isolation] [--config-setting CONFIG_SETTING] [srcdir]
positional arguments:
srcdir source directory (defaults to current directory)
optional arguments:
-h, --help show this help message and exit
--version, -V show program's version number and exit
--sdist, -s build a source distribution (enabled by default if no target is specified)
--wheel, -w build a wheel (enabled by default if no target is specified)
--outdir OUTDIR, -o OUTDIR
output directory (defaults to {srcdir}/dist)
--skip-dependency-check, -x
do not check that build dependencies are installed
--no-isolation, -n do not isolate the build in a virtual environment
--config-setting CONFIG_SETTING, -C CONFIG_SETTING
pass options to the backend. options which begin with a hyphen must be in the form of "--config-setting=--opt(=value)" or "-C--opt(=value)"
shows that it is option to build to wheel but there is no option to build to just plain directory like `setup.py build does. Looks like generating wheel and sdist is non-optional. I’m asking because:
- to unpack .whl I need
installorpipmodules (bot have some dependencies) - on rpm building packages I don’t need sdist tar ball.
I think that it would be good to add option to generate output like setup.py build does and to not build sdist archive.
Both options IMO would be very useful on packaging into OS distribution packages.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 23 (14 by maintainers)
There has been discussions about standardising test runner logic (the docs build is just a sub type of this). And the consensus was that we should standardize a subset of tox, no progress on this. Definitely out of scope for build, build only covers building sdist and wheel, nothing else. So we’ll not add anything else until some PEP mandates it.
Sorry, I am tired and misunderstood the issue. Please ignore my reply.
I don’t think build should gain support for arbitrary commands (though building documentation is technically a “build” operation, it’s not the same as building a wheel or sdist, and often you might also want serve, etc).
I would think you could write a PEP for docs, something like:
If unspecified, it could resolve to building with sphinx (or mkdocs if you want to get fancy). You’d also need a docs runner of some sort (like
python -m docs) (maybe nox/tox could be talked into supporting it?). This is a lot of work, and I’m not sure you can get enough interest in standardizing this (maybe the RtD people would be interested, though, they’ve struggled with supporting just one other runner in the past).Would a task-based PEP be something worth considering? Just imagining:
Which could then be supported by tox, nox, invoke, etc. This wouldn’t really help unless it also included suggestions like “use ‘docs’ for building docs”, “the output folder should be x”, etc). The authors of those packages should work on this, not me, though. 😃