Caffeine does not compile with python-setuptools 61.0+
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Caffeine |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I am trying to compile this for my own Linux system with this helper package. https:/
It seems like python-setuptools had a code update that changed how auto discovery of modules during build worked. If I understood what I read at https:/
Although I use Arch Linux, I'm reporting the issue here since this seems to be the place for the caffeine code. I'm not sure if a backwards compatible fix can be made since it seems Ubuntu has yet to get 'python-setuptools' v61 or newer yet.
```
Compiling for Locale: ar
Compiling for Locale: be
Compiling for Locale: bg
Compiling for Locale: bs
Compiling for Locale: ca
Compiling for Locale: cs
Compiling for Locale: da
Compiling for Locale: de
Compiling for Locale: el
Compiling for Locale: en_GB
Compiling for Locale: eo
Compiling for Locale: es
Compiling for Locale: eu
Compiling for Locale: fi
Compiling for Locale: fr
Compiling for Locale: gl
Compiling for Locale: he
Compiling for Locale: hr
Compiling for Locale: hu
Compiling for Locale: id
Compiling for Locale: it
Compiling for Locale: ja
Compiling for Locale: ko
Compiling for Locale: lt
Compiling for Locale: ms
Compiling for Locale: nl
Compiling for Locale: no
Compiling for Locale: oc
Compiling for Locale: pl
Compiling for Locale: pt
Compiling for Locale: pt_BR
Compiling for Locale: ro
Compiling for Locale: ru
Compiling for Locale: si
Compiling for Locale: sk
Compiling for Locale: sl
Compiling for Locale: sr
Compiling for Locale: sv
Compiling for Locale: sw
Compiling for Locale: th
Compiling for Locale: tr
Compiling for Locale: uk
Compiling for Locale: vi
Compiling for Locale: xh
Compiling for Locale: zh_CN
Compiling for Locale: zh_TW
error: Multiple top-level packages discovered in a flat-layout: ['etc', 'share', 'translations'].
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.
```
The fix appears to be adding ```py_modules=[]``` to the bottom of the 'setup' array of setup.py. That is the work around I am using for now.