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

distutils.errors.DistutilsOptionError: No configuration found for dynamic 'description'. #18

Closed
yurivict opened this issue Jun 19, 2022 · 6 comments · Fixed by #26
Closed

Comments

@yurivict
Copy link

Build fails on FreeBSD:

/usr/local/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py:102: _ExperimentalProjectMetadata: Support for project metadata in `pyproject.toml` is still experimental and may be removed (or change) in future releases.
  warnings.warn(msg, _ExperimentalProjectMetadata)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 1, in <module>
    import setuptools; setuptools.setup()
  File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 122, in setup
    dist.parse_config_files()
  File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 854, in parse_config_files
    pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
  File "/usr/local/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py", line 54, in apply_configuration
    config = read_configuration(filepath, True, ignore_option_errors, dist)
  File "/usr/local/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py", line 134, in read_configuration
    return expand_configuration(asdict, root_dir, ignore_option_errors, dist)
  File "/usr/local/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py", line 189, in expand_configuration
    return _ConfigExpander(config, root_dir, ignore_option_errors, dist).expand()
  File "/usr/local/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py", line 236, in expand
    self._expand_all_dynamic(dist, package_dir)
  File "/usr/local/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py", line 271, in _expand_all_dynamic
    obtained_dynamic = {
  File "/usr/local/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py", line 272, in <dictcomp>
    field: self._obtain(dist, field, package_dir)
  File "/usr/local/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py", line 309, in _obtain
    self._ensure_previously_set(dist, field)
  File "/usr/local/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py", line 295, 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`.
*** Error code 1

Version: 0.2.2
Python-3.8
FreeBSD 13.1

@OriolAbril
Copy link
Member

How are you trying to install? Pip? Conda? Which versions?

@OriolAbril
Copy link
Member

Hi, just checking in. I am unable to help having only the information you provided. If I had to guess I'd say it is probably due to an old setuptools version, but I am far from an expert on python packaging.

@yurivict
Copy link
Author

yurivict commented Aug 4, 2022

I am building using Python buildtools within of the FreeBSD ports framework.

It runs python setup.py config, then python setup.py build, ...

@OriolAbril
Copy link
Member

I might have found a way to fix the issue. Can you try #26 and see if it builds with your tooling? If so I'll make a new release to fix the issues you are having.

It might also be worth looking into different ways to build the packages though. I hope this works, but relying on setup.py might not work anymore in the future, even with setuptools, see this section or this footnote.

@yurivict
Copy link
Author

yurivict commented Aug 5, 2022

#26 totally fixed it.

@OriolAbril
Copy link
Member

Perfect! Just merged the PR, I'll try to make a new release in a few days

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 a pull request may close this issue.

2 participants