arviz-devs/xarray-einstats

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

yurivict opened this issue · 6 comments

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

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

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.

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

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

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.

#26 totally fixed it.

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