LordHansCapon / cotw-harvest-tracker

8 stars 3 forks source link

Pip Install Error #1

Closed ShinyGil closed 1 year ago

ShinyGil commented 1 year ago

Not the most important thing since you release prebuilds, but I tried to build the program for funsies and got this error. Unsure if I messed up somehow or what, since I'm not too familiar with Python building, but this was new. I ran pip install . in the directories themselves like the guide said and this was the output.



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

      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 modules
      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.
LordHansCapon commented 1 year ago

Thank you for your input, seems like including a py_modules=[] param for the setup call in the setup.py file solves the problem. An update has been issued to fix this.

https://github.com/LordHansCapon/cotw-harvest-tracker/blob/d8a48feaa9421132622bb480849e5e9460392f56/src/cotw-harvest-tracker/setup.py#L8C10-L8C10