File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -184,10 +184,10 @@ def get_downloads(self, pretty=False):
184
184
return data
185
185
186
186
def get_conf_py_path (self ):
187
- conf_py_path = self .project .conf_file (self .slug )
188
- conf_py_path = conf_py_path . replace (
189
- self . project . checkout_path ( self . slug ), '' )
190
- return conf_py_path . replace ( 'conf.py' , '' )
187
+ conf_py_path = self .project .conf_dir (self .slug )
188
+ checkout_prefix = self . project . checkout_path ( self . slug )
189
+ conf_py_path = os . path . relpath ( conf_py_path , checkout_prefix )
190
+ return conf_py_path
191
191
192
192
def get_build_path (self ):
193
193
'''Return version build path if path exists, otherwise `None`'''
Original file line number Diff line number Diff line change @@ -597,7 +597,7 @@ def conf_file(self, version=LATEST):
597
597
def conf_dir (self , version = LATEST ):
598
598
conf_file = self .conf_file (version )
599
599
if conf_file :
600
- return conf_file . replace ( '/conf.py' , '' )
600
+ return os . path . dirname ( conf_file )
601
601
602
602
@property
603
603
def is_type_sphinx (self ):
You can’t perform that action at this time.
0 commit comments