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

Installation with tag 0.1.0 is failing #33

Open
andrzejgorski opened this issue Apr 12, 2022 · 1 comment
Open

Installation with tag 0.1.0 is failing #33

andrzejgorski opened this issue Apr 12, 2022 · 1 comment

Comments

@andrzejgorski
Copy link

andrzejgorski commented Apr 12, 2022

Hello when I'm running pre-commit run -a with .pre-commit-config.yaml:

repos:
  - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
    rev: 0.1.0
    hooks:
      - id: yamlfmt
        args: [--mapping, "2", --sequence, "4", --offset, "2", --implicit_start, --preserve]

I got an error:

pre-commit run --all-files
[INFO] Installing environment for https://github.com/jumanjihouse/pre-commit-hook-yamlfmt.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/andrzej/.cache/pre-commit/repojun84su0/py_env-python3.8/bin/python', '-mpip', 'install', '.')
return code: 1
expected return code: 0
stdout:
    Looking in indexes: <Obfuscated link>, https://pypi.org/simple
    Processing /home/andrzej/.cache/pre-commit/repojun84su0
      Preparing metadata (setup.py): started
      Preparing metadata (setup.py): finished with status 'error'

stderr:
      error: subprocess-exited-with-error

      × python setup.py egg_info did not run successfully.
      │ exit code: 1
      ╰─> [14 lines of output]
          error: Multiple top-level packages discovered in a flat-layout: ['assets', 'pre_commit_hooks'].

          To avoid accidental inclusion of unwanted files or directories,
          setuptools will not proceed with this build.

          If you are trying to create a single distribution with multiple packages
          on purpose, you should not rely on automatic discovery.
          Instead, consider the following options:

          1. set up custom discovery (`find` directive with `include` or `exclude`)
          2. use a `src-layout`
          3. explicitly set `py_modules` or `packages` with a list of names

          To find more information, look for "package discovery" on setuptools docs.
          [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.

Check the log at /home/andrzej/.cache/pre-commit/pre-commit.log

Changing the ref from 0.1.0 to 0.1.1 solves the problem. I think both of tag should work. The problem appeared 5-6 hours ago on my CI

@zgldh
Copy link

zgldh commented May 4, 2023

How did you resolve that?

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

2 participants