mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Install tox locally if it wasn't already installed when running setup.py test
This commit is contained in:
parent
4f6fa981ec
commit
fd246fde89
10
setup.py
10
setup.py
@ -51,7 +51,16 @@ class Tox(Command):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
#import here, cause outside the eggs aren't loaded
|
#import here, cause outside the eggs aren't loaded
|
||||||
|
try:
|
||||||
import tox
|
import tox
|
||||||
|
except ImportError:
|
||||||
|
try:
|
||||||
|
self.distribution.fetch_build_eggs("tox")
|
||||||
|
import tox
|
||||||
|
except:
|
||||||
|
raise RuntimeError(
|
||||||
|
"The tests need 'tox' to run. Please install 'tox'."
|
||||||
|
)
|
||||||
import shlex
|
import shlex
|
||||||
args = self.tox_args
|
args = self.tox_args
|
||||||
if args:
|
if args:
|
||||||
@ -75,6 +84,5 @@ setup(
|
|||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
scripts=["synctl"] + glob.glob("scripts/*"),
|
scripts=["synctl"] + glob.glob("scripts/*"),
|
||||||
tests_require=['tox'],
|
|
||||||
cmdclass={'test': Tox},
|
cmdclass={'test': Tox},
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user