Cope with missing setup.py.
This commit is contained in:
parent
834d858adb
commit
82e680f67f
1 changed files with 4 additions and 0 deletions
|
@ -245,6 +245,8 @@ class SetupPy(BuildSystem):
|
||||||
raise FileNotFoundError(p)
|
raise FileNotFoundError(p)
|
||||||
|
|
||||||
def _extract_setup(self, session=None, fixers=None):
|
def _extract_setup(self, session=None, fixers=None):
|
||||||
|
if not self.has_setup_py:
|
||||||
|
return {}
|
||||||
if session is None:
|
if session is None:
|
||||||
return self._extract_setup_direct()
|
return self._extract_setup_direct()
|
||||||
else:
|
else:
|
||||||
|
@ -308,6 +310,8 @@ class SetupPy(BuildSystem):
|
||||||
def test(self, session, resolver, fixers):
|
def test(self, session, resolver, fixers):
|
||||||
if os.path.exists(os.path.join(self.path, 'tox.ini')):
|
if os.path.exists(os.path.join(self.path, 'tox.ini')):
|
||||||
run_with_build_fixers(session, ['tox'], fixers)
|
run_with_build_fixers(session, ['tox'], fixers)
|
||||||
|
elif self.pyproject:
|
||||||
|
run_with_build_fixers(session, [self.DEFAULT_PYTHON, "-m", "pep517.check", "."], fixers)
|
||||||
elif self.has_setup_py:
|
elif self.has_setup_py:
|
||||||
# Pre-emptively insall setuptools, since distutils doesn't provide
|
# Pre-emptively insall setuptools, since distutils doesn't provide
|
||||||
# a 'test' subcommand and some packages fall back to distutils
|
# a 'test' subcommand and some packages fall back to distutils
|
||||||
|
|
Loading…
Add table
Reference in a new issue