-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed as not planned
Description
Describe the bug
I'm not able to build the wheel for v1 because of the error: project.license must be valid exactly by one definition.
To Reproduce
Clone and checkout to the new version.
git clone https://github.com/openai/openai-python.git
cd openai-python/
git checkout origin/v1
Create a setup.py file:
vim setup.py
Paste the following:
from setuptools import setup
setup()
Build the wheel
python3 setup.py bdist_wheel
Error:
configuration error: `project.license` must be valid exactly by one definition (2 matches found):
- keys:
'file': {type: string}
required: ['file']
- keys:
'text': {type: string}
required: ['text']
DESCRIPTION:
`Project license <https://peps.python.org/pep-0621/#license>`_.
GIVEN VALUE:
"Apache-2.0"
OFFENDING RULE: 'oneOf'
DEFINITION:
{
"oneOf": [
{
"properties": {
"file": {
"type": "string",
"$$description": [
"Relative path to the file (UTF-8) which contains the license for the",
"project."
]
}
},
"required": [
"file"
]
},
{
"properties": {
"text": {
"type": "string",
"$$description": [
"The license of the project whose meaning is that of the",
"`License field from the core metadata",
"<https://packaging.python.org/specifications/core-metadata/#license>`_."
]
}
},
"required": [
"text"
]
}
]
}
Traceback (most recent call last):
File "/home/user_name/projects/openai-python/setup.py", line 3, in <module>
setup()
File "/home/user_name/anaconda3/lib/python3.9/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/home/user_name/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 159, in setup
dist.parse_config_files()
File "/home/user_name/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 908, in parse_config_files
pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
File "/home/user_name/anaconda3/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py", line 66, in apply_configuration
config = read_configuration(filepath, True, ignore_option_errors, dist)
File "/home/user_name/anaconda3/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py", line 129, in read_configuration
validate(subset, filepath)
File "/home/user_name/anaconda3/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py", line 55, in validate
raise ValueError(f"{error}\n{summary}") from None
ValueError: invalid pyproject.toml config: `project.license`.
configuration error: `project.license` must be valid exactly by one definition (2 matches found):
- keys:
'file': {type: string}
required: ['file']
- keys:
'text': {type: string}
required: ['text']
Code snippets
No response
OS
WSL2 Ubuntu
Python version
Python v3.9.7
Library version
openai-python v1.0.0
Metadata
Metadata
Assignees
Labels
No labels