File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -114,27 +114,6 @@ def which(prog):
114114
115115 return None
116116
117- @staticmethod
118- def find_python_no_venv ():
119- # FIXME: does it makes sense now that this script is in Python?
120-
121- result = SphinxDependencyChecker .run (["pwd" ], capture_output = True ,
122- text = True )
123- cur_dir = result .stdout .strip ()
124-
125- python_names = ["python3" , "python" ]
126-
127- for d in os .environ .get ("PATH" , "" ).split (":" ):
128- if f"{ cur_dir } /sphinx" in d :
129- continue
130-
131- for p in python_names :
132- if os .access (os .path .join (d , p ), os .X_OK ):
133- return os .path .join (d , p )
134-
135- # Python not found at the PATH
136- return python_names [- 1 ]
137-
138117 @staticmethod
139118 def get_python_version (cmd ):
140119
@@ -940,7 +919,7 @@ def recommend_sphinx_version(self, virtualenv_cmd):
940919 else :
941920 print ("\n Sphinx needs to be installed either:\n 1) via pip/pypi with:\n " )
942921
943- self .python_cmd = self . find_python_no_venv ( )
922+ self .python_cmd = os . path . abspath ( sys . argv [ 0 ] )
944923
945924 print (f"\t { virtualenv_cmd } { self .virtenv_dir } " )
946925 print (f"\t . { self .virtenv_dir } /bin/activate" )
You can’t perform that action at this time.
0 commit comments