>>> Source configured. >>> Compiling source in /var/tmp/portage/dev-python/symengine-0.9.2/work/symengine.py-0.9.2 ... * python3_9: running distutils-r1_run_phase distutils-r1_python_compile python3.9 setup.py build -j 4 error: Multiple top-level packages discovered in a flat-layout: ['cmake', 'symengine']. To avoid accidental inclusion of unwanted files or directories, ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1-j4-20220321-160039 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-9.3.1 [2] x86_64-pc-linux-gnu-10.3.1 [3] x86_64-pc-linux-gnu-11.2.1 * clang/llvm (if any): clang version 14.0.0 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/14/bin /usr/lib/llvm/14 14.0.0 Python 3.9.12 Available Ruby profiles: [1] ruby26 (with Rubygems) [2] ruby27 (with Rubygems) [3] ruby31 (with Rubygems) * Available Rust versions: [1] rust-bin-1.59.0 [2] rust-1.59.0 * The following VMs are available for generation-2: 1) Eclipse Temurin JRE 11.0.14_p9 [openjdk-jre-bin-11] *) Eclipse Temurin JRE 8.322_p06 [openjdk-jre-bin-8] Available Java Virtual Machines: [1] openjdk-jre-bin-8 system-vm [2] openjdk-jre-bin-11 The Glorious Glasgow Haskell Compilation System, version 8.10.4 php cli: HEAD of ::gentoo commit 0c0e3603ab8f258dede73f6a65d2102ddadc7a4f Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Fri Apr 1 10:19:43 2022 +0000 2022-04-01 10:19:41 UTC emerge -qpvO dev-python/symengine [ebuild N ] dev-python/symengine-0.9.2 USE="-test" PYTHON_TARGETS="python3_9 -python3_8 -python3_10"
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(+)