Skip to content

Migrate to pyproject.toml #189

@janluke

Description

@janluke

Having issues installing a package that depends on Cloup:

 Collecting cloup@ git+https://github.com/janluke/cloup.git/@cli (from -r /tmp/tmplb8kg4ml (line 12))
  Cloning https://github.com/janluke/cloup.git/ (to revision cli) to /tmp/pip-install-ci9mmnc6/cloup_13f8338e050c49dfa45fad4940632c66
  Running command git clone --filter=blob:none --quiet https://github.com/janluke/cloup.git/ /tmp/pip-install-ci9mmnc6/cloup_13f8338e050c49dfa45fad4940632c66
  Running command git checkout -b cli --track origin/cli
  Switched to a new branch 'cli'
  branch 'cli' set up to track 'origin/cli'.
  Resolved https://github.com/janluke/cloup.git/ to commit faf29d1a866626fd94ea23e1d4680cd39fd95347
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [69 lines of output]
      /tmp/pip-install-ci9mmnc6/cloup_13f8338e050c49dfa45fad4940632c66/.eggs/setuptools_scm-8.2.0-py3.9.egg/setuptools_scm/_integration/setuptools.py:31: RuntimeWarning:
      ERROR: setuptools==58.1.0 is used in combination with setuptools-scm>=8.x
      
      Your build configuration is incomplete and previously worked by accident!
      setuptools-scm requires setuptools>=61
      
      Suggested workaround if applicable:
       - migrating from the deprecated setup_requires mechanism to pep517/518
         and using a pyproject.toml to declare build dependencies
         which are reliably pre-installed before running the build tools
      
        warnings.warn(
      WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
      Traceback (most recent call last):
        File "/tmp/pip-install-ci9mmnc6/cloup_13f8338e050c49dfa45fad4940632c66/.eggs/setuptools_scm-8.2.0-py3.9.egg/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
          section = defn.get("tool", {})[tool_name]
      KeyError: 'setuptools_scm'
      running egg_info
      creating /tmp/pip-pip-egg-info-76eex0qm/cloup.egg-info
      writing /tmp/pip-pip-egg-info-76eex0qm/cloup.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-76eex0qm/cloup.egg-info/dependency_links.txt
      writing entry points to /tmp/pip-pip-egg-info-76eex0qm/cloup.egg-info/entry_points.txt
      writing requirements to /tmp/pip-pip-egg-info-76eex0qm/cloup.egg-info/requires.txt
      writing top-level names to /tmp/pip-pip-egg-info-76eex0qm/cloup.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-76eex0qm/cloup.egg-info/SOURCES.txt'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-ci9mmnc6/cloup_13f8338e050c49dfa45fad4940632c66/setup.py", line 17, in <module>
          setup(
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 299, in run
          self.find_sources()
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 306, in find_sources
          mm.run()
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 541, in run
          self.add_defaults()
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 578, in add_defaults
          sdist.add_defaults(self)
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/distutils/command/sdist.py", line 226, in add_defaults
          self._add_defaults_python()
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/setuptools/command/sdist.py", line 107, in _add_defaults_python
          build_py = self.get_finalized_command('build_py')
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/distutils/cmd.py", line 299, in get_finalized_command
          cmd_obj.ensure_finalized()
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/distutils/cmd.py", line 107, in ensure_finalized
          self.finalize_options()
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/setuptools/command/build_py.py", line 29, in finalize_options
          orig.build_py.finalize_options(self)
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/distutils/command/build_py.py", line 43, in finalize_options
          self.set_undefined_options('build',
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/distutils/cmd.py", line 286, in set_undefined_options
          src_cmd_obj = self.distribution.get_command_obj(src_cmd)
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/distutils/dist.py", line 857, in get_command_obj
          klass = self.get_command_class(command)
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/setuptools/dist.py", line 887, in get_command_class
 self.cmdclass[command] = cmdclass = ep.load()
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2450, in load
          return self.resolve()
        File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2456, in resolve
          module = __import__(self.module_name, fromlist=['__name__'], level=0)
      ModuleNotFoundError: No module named 'setuptools.command.build'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.21/x64/bin/pip-sync", line 8, in <module>
    sys.exit(cli())
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/piptools/scripts/sync.py", line 145, in cli
    sync.sync(
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/piptools/sync.py", line 263, in sync
    run(  # nosec
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/opt/hostedtoolcache/Python/3.9.21/x64/bin/python', '-m', 'pip', 'install', '-r', '/tmp/tmplb8kg4ml']' returned non-zero exit status 1.
make: *** [Makefile:9: install] Error 1
Error: Process completed with exit code 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions