chrisjbillington / git-nautilus-icons

A nautilus Python extension to overlay icons on files in git repositories
BSD 2-Clause "Simplified" License
43 stars 4 forks source link

Multiple top-level packages discovered in a flat-layout: ['icons', 'distro_icons', 'icon_testing_dir']. #22

Closed dquark closed 2 years ago

dquark commented 2 years ago

Hi there, I'm running Fedora 35 and pip version 22.0.4, I keep getting this error while trying to install it:

> pip3 install --user git-nautilus-icons
Collecting git-nautilus-icons
  Using cached git-nautilus-icons-2.0.2.tar.gz (437 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      error: Multiple top-level packages discovered in a flat-layout: ['icons', 'distro_icons', 'icon_testing_dir'].

      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: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
chrisjbillington commented 2 years ago

Thanks @dquark,

This wasn't an issue in the past, not sure why it is now but the fix is easy enough - as the error message says, we just have to be explicit about which directories are python packages (none of them are).

This should be fixed by the trivial change in 6efe9961f221e5cab362d1f70584b1b3f5e42dc7.

Could you test installing from git master like so?

$ pip3 install --user git+https://github.com/chrisjbillington/git-nautilus-icons

If it works for you I'll tag a new release with the fix.

dquark commented 2 years ago

Works like a charm, thank you :-)

chrisjbillington commented 2 years ago

Great, thanks for testing and for the initial report! Tagged and uploaded to PyPI as v2.0.3.