Description
setuptools version
setuptools==69.1.1
Python version
Python 3.11
OS
Fedoa Workstation 39
Additional environment information
No response
Description
I've a custom setuptools extension, which tries to do some things, based on the name of the Distribution. It has worked before, but now, we are migrating the keywords from the setup.py
to the pyproject.toml
and this resulted in the Distribution.get_name()
always being UNKNOWN
in the Options finalizer (setuptools.finalize_distribution_options
entry-point).
Expected behavior
I'd have expected the distribution options to be set when running the option finalizers, regardless of whether the options are set using the pyproject.toml
or the setup.py
.
How to Reproduce
- Clone the example from https://github.com/hansingt/setuptools-dist-name-unknown
python -m venv venv
./venv/bin/pip install -e .
./venv/bin/python setup.py --name
Output
DIST NAME: UNKNOWN
test
PS: The behaviour is demonstrated using a direct call to setup.py
, but it behaves the same, when building the distribution, either using setup.py bdist_wheel
,pip wheel
, or python -m build
. The only difference is, that you don't see the output when running these commands.