Skip to content

Commit 2c11c0a

Browse files
committed
Allow installation of the project without a setup.py
With PEP 517, projects may no longer even have one in the future.
1 parent ec23bc9 commit 2c11c0a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

readthedocs/doc_builder/python_environments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def delete_existing_build_dir(self):
4747
shutil.rmtree(build_dir)
4848

4949
def install_package(self):
50-
setup_path = os.path.join(self.checkout_path, 'setup.py')
51-
if os.path.isfile(setup_path) and self.config.install_project:
50+
if self.config.install_project:
51+
setup_path = os.path.join(self.checkout_path, 'setup.py')
5252
if self.config.pip_install or getattr(settings, 'USE_PIP_INSTALL', False):
5353
extra_req_param = ''
5454
if self.config.extra_requirements:
@@ -65,7 +65,7 @@ def install_package(self):
6565
cwd=self.checkout_path,
6666
bin_path=self.venv_bin()
6767
)
68-
else:
68+
elif os.path.isfile(setup_path):
6969
self.build_env.run(
7070
'python',
7171
'setup.py',

0 commit comments

Comments
 (0)