roboticslab-uc3m / gymnasium-playground

gymnasium-playground
0 stars 0 forks source link

Multiple top-level packages discovered in a flat-layout #7

Closed orientnab closed 1 year ago

orientnab commented 1 year ago

On installation pip throws:

error: Multiple top-level packages discovered in a flat-layout

It seems it can be fixed by specifying the package in setup.py.

setup(
    ...,
    packages=["gymnasium_playground_gridworld"],
)
jgvictores commented 1 year ago

Hi!

I know the solution you propose is very easy to incorporate, but I'm curious given the context:

Quite a bit of blame on setuptools found via https://www.google.com/search?q=Multiple+top-level+packages+discovered+in+a+flat-layout.

  1. Which version are you using (pip list | grep setuptools)?
  2. Could you try with a more recent version?

Cheers!

orientnab commented 1 year ago

It seems something has become stricter or more explicit since 61.0. I'm on 65.5, I don't think a new version will change much.

Please note that it is not possible to automatically derive a single name when the distribution consists of multiple top-level packages or modules. (https://setuptools.pypa.io/en/latest/history.html#v61-0-0)

_Users that don’t set packages, pymodules, or configuration are still likely to observe the auto-discovery behavior, which may halt the build if the project contains multiple directories and/or multiple Python files directly under the project root. (https://setuptools.pypa.io/en/latest/history.html#v61-1-0)

jgvictores commented 1 year ago

Ok, thanks for the info!

I've committed directly to master at https://github.com/roboticslab-uc3m/gymnasium-playground/commit/31ba44d436f16de5e849bee400efd9d63cbdfdea

Please reopen if this did not make the fix!