Closed buddly27 closed 4 years ago
That's a good question, thanks for pointing this out.
It was quite a long time ago, but I remember Click (or possibly another library) didn't support being vendorised. It used absolute references internally, which I "solved" by making it happy and putting it on the absolute path.
It doesn't look necessary anymore, but are you able to quickly test this? E.g. remove that line, and see if anything you normally do still works.
For what I can see, all vendorised libraries are being imported via the vendor
module.
Unit tests are running without the sys.path.insert
and the command line seems to work fine as well.
Thanks for the thorough investigation @buddly27. Would you mind making a PR for this, such that the automated tests can kick in? I expect that if those still pass, we'll be good to go.
Done :)
Is this line absolutely necessary?
https://github.com/pyblish/pyblish-base/blob/841f40821507964389adac01683ac86f745bb5fe/pyblish/vendor/__init__.py#L5
Because of this, if you have a tool using
click
, it picks up your vendor library which is a bit old.. You seems to be using "vendorised" libraries from thevendor
module, so why adding them tosys.path
?https://github.com/pyblish/pyblish-base/blob/8588808a0e7e6f819e618909359502c5c8327e2e/pyblish/cli.py#L30
https://github.com/pyblish/pyblish-base/blob/841f40821507964389adac01683ac86f745bb5fe/run_testsuite.py#L10