mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
530 stars 343 forks source link

fix error locating /usr/share/yang with pip 21.3.1 #798

Closed cygnus2048 closed 2 years ago

cygnus2048 commented 2 years ago

root issue is in new version of pip there is no disutils_scheme so the following line never works: location = locations.distutils_scheme('pyang')

The replacement is locations.get_scheme(), however, I found this does not work when pyang is installed with --user.

Instead, I suggest just trying several of the common possible install paths, including the home directory to handle the case when installing with --user.

mbj4668 commented 2 years ago

I had to revert this. b/c tests/test_issues/test_i225 fails.

cygnus2048 commented 2 years ago

ah, makes sense. I did not update any of the tests accordingly. Hopefully someone with more knowledge of the intent can update it. Thanks.