File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 1+ import json
12import os .path
23import sys
4+ from importlib .metadata import distribution
35
46
57VERSION = (1 , 11 , 0 )
@@ -33,14 +35,8 @@ def _is_devel_install():
3335 # pip install -e <path-to-git-checkout> will do a "devel" install.
3436 # This means it creates a link back to the checkout instead
3537 # of copying the files.
36- try :
37- import packaging
38- except ModuleNotFoundError :
39- return False
40- sitepackages = os .path .dirname (os .path .dirname (packaging .__file__ ))
41- if os .path .isdir (os .path .join (sitepackages , 'pyperformance' )):
42- return False
43- if not os .path .exists (os .path .join (sitepackages , 'pyperformance.egg-link' )):
44- # XXX Check the contents?
45- return False
46- return True
38+
39+ direct_url = distribution ("pyperformance" ).read_text ("direct_url.json" )
40+ if direct_url :
41+ return json .loads (direct_url ).get ("dir_info" , {}).get ("editable" , False )
42+ return False
You can’t perform that action at this time.
0 commit comments