Summary: | dev-python/symengine-0.9.2 - error: Multiple top-level packages discovered in a flat-layout: [cmake, symengine]. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo Science Mathematics related packages <sci-mathematics> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ionen, mgorny |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/symengine/symengine.py/pull/402 https://bugs.gentoo.org/show_bug.cgi?id=842519 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 836676 | ||
Attachments: |
emerge-info.txt
dev-python:symengine-0.9.2:20220401-110159.log emerge-history.txt.bz2 environment etc.portage.tar.bz2 temp.tar.bz2 |
Description
Toralf Förster
2022-04-01 14:31:22 UTC
Created attachment 768386 [details]
emerge-info.txt
Created attachment 768387 [details]
dev-python:symengine-0.9.2:20220401-110159.log
Created attachment 768388 [details]
emerge-history.txt.bz2
Created attachment 768389 [details]
environment
Created attachment 768390 [details]
etc.portage.tar.bz2
Created attachment 768391 [details]
temp.tar.bz2
I have the same problem, seems this issue is related with setuptools. In my build dev-python/symengine only compiles with dev-python/setuptools-60.9.2! I third this. Thanks to Maurizio Contu for identifying a quick fix! In my case, though, I'm *definitely* not downgrading setuptools just to emerge symengine – especially because setuptools > 60.9.2 is absolutely correct here: 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 It's symengine's "setup.py" that's at fault here. The standard way for upstream to handle this is to pass the "packages" parameter to setup() ala: import setuptools setuptools.setup( packages=setuptools.find_packages(exclude=( f'{meta.PACKAGE_NAME}_test', f'{meta.PACKAGE_NAME}_test.*', 'build', )), ... ) Would someone mind filing (or linking to) an upstream symengine issue on this? There's https://github.com/symengine/symengine.py/commit/987e665e71cf92d1b021d7d573a1b9733408eecf but then I end up with: ``` * Installing the wheel to /var/tmp/portage/dev-python/symengine-0.9.2/work/symengine.py-0.9.2-python3_8/install Traceback (most recent call last): File "/usr/lib/python-exec/python3.8/gpep517", line 4, in <module> sys.exit(main()) File "/usr/lib/python3.8/site-packages/gpep517/__main__.py", line 136, in main return func(args) File "/usr/lib/python3.8/site-packages/gpep517/__main__.py", line 77, in install_wheel install(source, dest, {}) File "/usr/lib/python3.8/site-packages/installer/_core.py", line 109, in install record = destination.write_file( File "/usr/lib/python3.8/site-packages/installer/destinations.py", line 207, in write_file return self.write_to_fs(scheme, path_, stream, is_executable) File "/usr/lib/python3.8/site-packages/installer/destinations.py", line 167, in write_to_fs raise FileExistsError(message) FileExistsError: File already exists: /var/tmp/portage/dev-python/symengine-0.9.2/work/symengine.py-0.9.2-python3_8/install/usr/lib/python3.8/site-packages/symengine/__init__.py * ERROR: dev-python/symengine-0.9.2::gentoo failed (compile phase): ``` The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da3446bb7624729eb9d057fa17a10cdc46ff9d25 commit da3446bb7624729eb9d057fa17a10cdc46ff9d25 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-05-03 00:49:40 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-05-03 00:49:40 +0000 dev-python/symengine: fix build with >=setuptools-61; wheel duplication Closes: https://bugs.gentoo.org/836599 Thanks-to: Michał Górny <mgorny@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org> .../files/symengine-0.9.2-cmake-setuptools.patch | 84 ++++++++++++++++++++++ .../files/symengine-0.9.2-setuptools-61.patch | 17 +++++ dev-python/symengine/symengine-0.9.2-r1.ebuild | 56 +++++++++++++++ 3 files changed, 157 insertions(+) |