[PATCH 0 of 2 Cubicweb] Update Cubicweb to retrive cube's version using pkg_resources
ptrck at nskm.xyz
Fri Jan 3 18:04:57 CET 2020
Hello people, really hope you're all doing fine.
Really hope everything is okay, families, health, new year celebration, ...
The following is an attempt to finish my work on https://www.cubicweb.org/ticket/17254012
I was supposed to modify Cubicweb, and use pkg_resources to retrieve cube's version.
Everything seems to work nice,
but I'm not sure this solution is clean enough:
- because of the nested try/except blocks
- because of me passing sys.path to a function
- because this hack is written only to handle some cubes used during migration tests
During the migration tests, there are some cubes that are in the old format.
pkg_resources was not able to "find ditributions" related to those cubes.
I've done, what Philippe advised to do: build eggs for those cubes.
And to find those "not pip installed distributions",
I've used the pkg_resources.find_distributions function.
Thanks a lot for your advices and suggestions.
Best wishes for 0x7e4
More information about the cubicweb-devel