-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Needs TriageIssues that need to be evaluated for severity and status.Issues that need to be evaluated for severity and status.Waiting User Feedbackbug
Description
setuptools version
setuptools==68.2.1
Python version
Python 3.9.13
OS
Mac OS X
Additional environment information
No response
Description
When using pyproject.toml's [project] descriptors's version attribute, the newest version of setup tools breaks with the following exception:
$ python setup.py --version
Traceback (most recent call last):
File "/workspace/setup.py", line 2, in <module>
setup(
File "/Users/jstarker/.pyenv/versions/setup-version-failed/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
File "/Users/jstarker/.pyenv/versions/setup-version-failed/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 172, in setup
ok = dist.parse_command_line()
File "/Users/jstarker/.pyenv/versions/setup-version-failed/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 467, in parse_command_line
args = parser.getopt(args=self.script_args, object=self)
File "/Users/jstarker/.pyenv/versions/setup-version-failed/lib/python3.9/site-packages/setuptools/_distutils/fancy_getopt.py", line 274, in getopt
val = getattr(object, attr, 0) + 1
TypeError: can only concatenate str (not "int") to str
This works with 68.2.0.
Expected behavior
Expected to display the version of the test project
How to Reproduce
- Create two files:
# setup.py
from setuptools import setup
setup()
# pyproject.toml
[project]
name = "test"
version = "1.0.0"
- Install
setuptools==68.2.1 - Run
python setup.py --version
Output
$ python setup.py --version
Traceback (most recent call last):
File "/workspace/setup.py", line 2, in <module>
setup(
File "/Users/jstarker/.pyenv/versions/setup-version-failed/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
File "/Users/jstarker/.pyenv/versions/setup-version-failed/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 172, in setup
ok = dist.parse_command_line()
File "/Users/jstarker/.pyenv/versions/setup-version-failed/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 467, in parse_command_line
args = parser.getopt(args=self.script_args, object=self)
File "/Users/jstarker/.pyenv/versions/setup-version-failed/lib/python3.9/site-packages/setuptools/_distutils/fancy_getopt.py", line 274, in getopt
val = getattr(object, attr, 0) + 1
TypeError: can only concatenate str (not "int") to strromain-dartigues
Metadata
Metadata
Assignees
Labels
Needs TriageIssues that need to be evaluated for severity and status.Issues that need to be evaluated for severity and status.Waiting User Feedbackbug