cubicweb #13001466 cubes: distribution, installation. namespace, python3... [validation pending]
There has already been some discussions about this (see the CWEP 004 thread in particular).
On the road towards Python 3 compatibility (which 3.23 would apparently
achieve for cubicweb itself), it seems that the current distribution and
installation layout of cubes would pose problems; for instance, how would
python2 and python3 versions of the same cube would install things in
Should I draw some (subjective?) conclusions from the CWEP 004 thread (and
some other, probably more informal, discussions here and there), I'd say that
there is a consensus that we should move away from the
One idea from the CWEP 004 thread would be to name cubes' packages as
Another idea (from CWEP 004) is to rely on setuptools entry-points for some details. The benefits of this are unclear to me at the moment...
Anyhow, I had a look a the flask project which recently handled a similar
transition (appart from the installation is
|closed by||#bc04039acd2e [config] Make available_cubes aware of cubes installed as packages|
|patch||[skeleton] Remove override_dh_python2 [applied][skeleton] Have setuptools install data files [applied][skeleton] Update MANIFEST.in following new "package" layout [applied][skeleton] Add python-setuptools to Debian Build-Depends [applied][skeleton] Add dh-python to Debian Build-Depends [applied]Use pkgutil.ImpLoader instead of a custom loader for cubes import redirection [applied][config] Make available_cubes aware of cubes installed as packages [applied][config] One warn about legacy cubes in available_cubes when called from "list" command [rejected][devtools] Handle i18ncube command for "cubes as packages" [applied]Handle cubes as packages in cwconfig [applied]Add an import redirect hook from "cubes.<name>" to "cubicweb_<name>" [applied][devtools] Update skeleton's setup.py to install cube as a package [applied][devtools] Adjust skeleton setup.py to have it read information from __pkginfo__.py [applied][devtools] Update skeleton and newcube command to cube as package layout [applied][cwconfig] Extend cubes.__path__ rather than overriding it [rejected]|