Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DistutilsOptionError #570 #571

Merged
merged 1 commit into from
Jul 26, 2022
Merged

Fix DistutilsOptionError #570 #571

merged 1 commit into from
Jul 26, 2022

Conversation

tatiana
Copy link
Collaborator

@tatiana tatiana commented Jul 26, 2022

Co-authored-with: @uranusjr
Fix: #570

Aims to solve this issue in the CI:

File "/home/runner/work/astro-sdk/astro-sdk/.nox/type_check-3-8/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py", line 301, in _ensure_previously_set
          raise OptionError(msg)
      distutils.errors.DistutilsOptionError: No configuration found for dynamic 'description'.
      Some dynamic fields need to be specified via `tool.setuptools.dynamic`
      others must be specified via the equivalent attribute in `setup.py`.
      [end of output]

File "/home/runner/work/astro-sdk/astro-sdk/.nox/type_check-3-8/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py", line 301, in _ensure_previously_set
          raise OptionError(msg)
      distutils.errors.DistutilsOptionError: No configuration found for dynamic 'description'.
      Some dynamic fields need to be specified via `tool.setuptools.dynamic`
      others must be specified via the equivalent attribute in `setup.py`.
      [end of output]
@@ -36,6 +36,7 @@ jobs:
env:
MYPY_FORCE_COLOR: 1
TERM: xterm-color
SETUPTOOLS_USE_DISTUTILS: stdlib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this line do? Just for my knowledge.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunank200 I believe this comment explains the key issue:
pypa/setuptools#2965 (comment)

The way the distutils hack works, it makes Setuptools' own copy of distutils take precedence over the standard library, so causes import distutils to put sys.modules['distutils'] = <setuptools._distutils>. So it's not a big surprise to me that running the tests from the standard library against code not in the standard library will have problems.

More information in the official docs:
https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html

@tatiana tatiana merged commit 9c7d7cc into main Jul 26, 2022
@tatiana tatiana deleted the issue-570 branch July 26, 2022 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug distutils.errors.DistutilsOptionError: No configuration found for dynamic 'description'.
3 participants