symengine / symengine.py

Python wrappers for SymEngine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error: Multiple top-level packages discovered in a flat-layout: ['cmake', 'symengine'].

jhgoebbert opened this issue · comments

This is an error message that presumably started appearing in setuptools version 61.0.0 (setuptools.pypa.io/en/latest/history.html#v61-0-0) in March 2022.

Processing /dev/shm/goebbert1/jusuf/SymEnginepython/0.9.2/GCC-11.3.0/symengine.py-0.9.2
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status '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: ['cmake', 'symengine'].

      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.
```

A possible patch might be:

diff -Naur symengine.py-0.9.2.orig/setup.py symengine.py-0.9.2/setup.py
--- symengine.py-0.9.2.orig/setup.py    2022-03-07 23:39:26.000000000 +0100
+++ symengine.py-0.9.2/setup.py 2023-02-05 09:58:50.534749182 +0100
@@ -238,5 +238,6 @@
         'Programming Language :: Python :: 3.8',
         'Programming Language :: Python :: 3.9',
         'Programming Language :: Python :: 3.10',
-        ]
+        ],
+      py_modules=[]
       )

Which version are you using?

Can you try the git master version?

I like to stick with a release version, so I added the patch to our easybuild config file and pushed it to production.
Anyway, I cannot see any fix in setup.py since the release of 0.9.2 in the history : https://github.com/symengine/symengine.py/blame/master/setup.py 🤔

987e665 and #402 should fix it

I'll release a new version soon

Cool, great. Thank you

Just released a new version.