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

Unable to install setuptools-scm from source due to tomli project's pyproject.toml #1090

Open
safiyat opened this issue Nov 28, 2024 · 0 comments

Comments

@safiyat
Copy link

safiyat commented Nov 28, 2024

While installing bcrypt-4.0.1.tar.gz from source, the dependency chain includes setuptools-scm.

setuptools-scm requires tomli, whose pyproject.toml the pre-installed toml is unable to parse.

Logs:

    Collecting setuptools_scm
      Using cached setuptools_scm-8.1.0.tar.gz (76 kB)
      Installing build dependencies: started
      Installing build dependencies: finished with status 'error'
      ERROR: Command errored out with exit status 2:
       command: /home/ubuntu/taws/package/common/venv38/bin/python /home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-zty3bn41/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=61' 'tomli; python_version < "3.11"'
           cwd: None
      Complete output (45 lines):
      Collecting setuptools>=61
        Using cached setuptools-75.3.0.tar.gz (1.4 MB)
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
          Preparing wheel metadata: started
          Preparing wheel metadata: finished with status 'done'
      Collecting tomli
        Using cached tomli-2.2.1.tar.gz (17 kB)
      ERROR: Exception:
      Traceback (most recent call last):
        File "/home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 186, in _main
          status = self.run(options, args)
        File "/home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 357, in run
          resolver.resolve(requirement_set)
        File "/home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
          discovered_reqs.extend(self._resolve_one(requirement_set, req))
        File "/home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
          abstract_dist = self._get_abstract_dist_for(req_to_install)
        File "/home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
          abstract_dist = self.preparer.prepare_linked_requirement(req)
        File "/home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 515, in prepare_linked_requirement
          abstract_dist = _get_prepared_distribution(
        File "/home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 95, in _get_prepared_distribution
          abstract_dist.prepare_distribution_metadata(finder, build_isolation)
        File "/home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 33, in prepare_distribution_metadata
          self.req.load_pyproject_toml()
        File "/home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 512, in load_pyproject_toml
          pyproject_toml_data = load_pyproject_toml(
        File "/home/ubuntu/taws/package/common/venv38/lib/python3.8/site-packages/pip/_internal/pyproject.py", line 77, in load_pyproject_toml
          pp_toml = toml.load(f)
        File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 134, in load
          return loads(f.read(), _dict, decoder)
        File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 455, in loads
          ret = decoder.load_line(line, currentlevel, multikey,
        File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 725, in load_line
          value, vtype = self.load_value(pair[1], strictly_valid)
        File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 802, in load_value
          return (self.load_array(v), "array")
        File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 938, in load_array
          nval, ntype = self.load_value(a[i])
        File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 802, in load_value
          return (self.load_array(v), "array")
        File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 914, in load_array
          a[b] = a[b] + ',' + a[b + 1]
      IndexError: list index out of range
anchal39 added a commit to anchal39/setuptools-scm that referenced this issue Nov 28, 2024
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

No branches or pull requests

1 participant