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

CI is broken: setuptools_scm ModuleNotFoundError: No module named 'tomli' #1775

Closed
carlosperate opened this issue Aug 27, 2021 · 3 comments
Closed

Comments

@carlosperate
Copy link
Member

carlosperate commented Aug 27, 2021

From the CI:

Collecting adafruit-board-toolkit~=1.1
  Downloading adafruit-board-toolkit-1.1.0.tar.gz (34 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /Users/runner/hostedtoolcache/Python/3.6.14/x64/bin/python /Users/runner/hostedtoolcache/Python/3.6.14/x64/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpy7xb811j
         cwd: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-szf6jl68/adafruit-board-toolkit_9dc3c74c56134dbb8ff383bfee2a5524
    Complete output (32 lines):
    Traceback (most recent call last):
      File "/Users/runner/hostedtoolcache/Python/3.6.14/x64/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
        main()
      File "/Users/runner/hostedtoolcache/Python/3.6.14/x64/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/Users/runner/hostedtoolcache/Python/3.6.14/x64/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 151, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-w917timz/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 166, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-w917timz/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 259, in run_setup
        self).run_setup(setup_script=setup_script)
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-w917timz/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 150, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 54, in <module>
        packages=["adafruit_board_toolkit"],
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-w917timz/overlay/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/Users/runner/hostedtoolcache/Python/3.6.14/x64/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-w917timz/overlay/lib/python3.6/site-packages/setuptools/dist.py", line 456, in __init__
        k: v for k, v in attrs.items()
      File "/Users/runner/hostedtoolcache/Python/3.6.14/x64/lib/python3.6/distutils/dist.py", line 281, in __init__
        self.finalize_options()
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-w917timz/overlay/lib/python3.6/site-packages/setuptools/dist.py", line 807, in finalize_options
        ep(self)
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-w917timz/normal/lib/python3.6/site-packages/setuptools_scm/integration.py", line 52, in infer_version
        config = Configuration.from_file(dist_name=dist_name)
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-w917timz/normal/lib/python3.6/site-packages/setuptools_scm/config.py", line 187, in from_file
        defn = _load_toml(data)
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-w917timz/normal/lib/python3.6/site-packages/setuptools_scm/config.py", line 59, in _lazy_tomli_load
        from tomli import loads
    ModuleNotFoundError: No module named 'tomli'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c8/bf/5f30ad39b4e781ed32dd5ddfadd75e1bc20710d78d7e5627f586e341687e/adafruit-board-toolkit-1.1.0.tar.gz#sha256=61e19c30854764230138f4c1d65bf3b5d6ef22866396b231df7123a5a2507f27 (from https://pypi.org/simple/adafruit-board-toolkit/) (requires-python:>=3.5.0). Command errored out with exit status 1: /Users/runner/hostedtoolcache/Python/3.6.14/x64/bin/python /Users/runner/hostedtoolcache/Python/3.6.14/x64/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpy7xb811j Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement adafruit-board-toolkit~=1.1 (from mu-editor[dev]) (from versions: 1.0.0, 1.0.1, 1.1.0)
ERROR: No matching distribution found for adafruit-board-toolkit~=1.1

I can replicate locally if I remove the wheels from my pip cache and try to install adafruit-board-toolkit:

pip cache purge
pip uninstall adafruit-board-toolkit
pip install adafruit-board-toolkit~=1.1
Collecting adafruit-board-toolkit~=1.1
  Using cached adafruit-board-toolkit-1.1.0.tar.gz (34 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/microbit-carlos/workspace/mine/mu-upstream/.venv/bin/python /Users/microbit-carlos/workspace/mine/mu-upstream/.venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/tmpb_dtciot
         cwd: /private/var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/pip-install-zrqs2fhx/adafruit-board-toolkit
    Complete output (32 lines):
    Traceback (most recent call last):
      File "/Users/microbit-carlos/workspace/mine/mu-upstream/.venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
        main()
      File "/Users/microbit-carlos/workspace/mine/mu-upstream/.venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/Users/microbit-carlos/workspace/mine/mu-upstream/.venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/private/var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/pip-build-env-zbr498da/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 166, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "/private/var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/pip-build-env-zbr498da/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 258, in run_setup
        super(_BuildMetaLegacyBackend,
      File "/private/var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/pip-build-env-zbr498da/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 150, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 24, in <module>
        setup(
      File "/private/var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/pip-build-env-zbr498da/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/Users/microbit-carlos/.pyenv/versions/3.8.2/lib/python3.8/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/private/var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/pip-build-env-zbr498da/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 455, in __init__
        _Distribution.__init__(self, {
      File "/Users/microbit-carlos/.pyenv/versions/3.8.2/lib/python3.8/distutils/dist.py", line 292, in __init__
        self.finalize_options()
      File "/private/var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/pip-build-env-zbr498da/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 807, in finalize_options
        ep(self)
      File "/private/var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/pip-build-env-zbr498da/normal/lib/python3.8/site-packages/setuptools_scm/integration.py", line 52, in infer_version
        config = Configuration.from_file(dist_name=dist_name)
      File "/private/var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/pip-build-env-zbr498da/normal/lib/python3.8/site-packages/setuptools_scm/config.py", line 187, in from_file
        defn = _load_toml(data)
      File "/private/var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/pip-build-env-zbr498da/normal/lib/python3.8/site-packages/setuptools_scm/config.py", line 59, in _lazy_tomli_load
        from tomli import loads
    ModuleNotFoundError: No module named 'tomli'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/microbit-carlos/workspace/mine/mu-upstream/.venv/bin/python /Users/microbit-carlos/workspace/mine/mu-upstream/.venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/jy/jkj1bwkd1blg0fd67553zct00000gn/T/tmpb_dtciot Check the logs for full command output.

We can see that the build requirements is the latest version of setuptools_scm:
https://github.com/adafruit/Adafruit_Board_Toolkit/blob/b6ed0c8f05f0b408114c5075a5377bea83c1f83e/setup.py#L27

@carlosperate
Copy link
Member Author

This was just opened a few minutes ago, so it seems like a common issue that started with the latest release from about an hour ago: pypa/setuptools-scm#608

@carlosperate
Copy link
Member Author

The setuptools-scm broken versions have been yanked and CI should start to work again:

image

@carlosperate
Copy link
Member Author

This was resolved in the respective dependencies (although it did break again a couple of days later, but it was swiftly fixed again).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant