mariobuikhuizen / voila-embed

Embed jupyter widgets in existing websites
Other
52 stars 7 forks source link

install breaks for setuptools >= 61 #27

Closed falkben closed 2 years ago

falkben commented 2 years ago

with setuptools >= 61 this package fails to install

This is because of a breaking change with setuptools:

Projects that currently don’t specify both packages and py_modules in their configuration and contain extra folders or Python files (not meant for distribution), might see these files being included in the wheel archive or even experience the build to fail.

https://setuptools.pypa.io/en/latest/history.html#v61-0-0

Basically we want to disable package discovery (set packages=[] seems to do the trick).

This is the error with a recent version of setuptools (61.2.0)

pip install -e .               
Obtaining file:///Users/bfalk/voila-embed
  Preparing metadata (setup.py) ... error
  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: ['share', 'example_site'].

      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.
falkben commented 2 years ago

sorry, working with @havok2063, duplicate https://github.com/mariobuikhuizen/voila-embed/issues/26