mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-01 03:12:49 +08:00
Linter when only python3 exists
Reviewed By: nikhilaravi Differential Revision: D31289856 fbshipit-source-id: 5a522a69537a873bacacf2a178e5f30771aef35f
This commit is contained in:
parent
dd76b41014
commit
1aab192706
@ -10,7 +10,10 @@
|
||||
{
|
||||
V=$(black --version|cut '-d ' -f3)
|
||||
code='import distutils.version; assert "19.3" < distutils.version.LooseVersion("'$V'")'
|
||||
python -c "${code}" 2> /dev/null
|
||||
PYTHON=false
|
||||
command -v python > /dev/null && PYTHON=python
|
||||
command -v python3 > /dev/null && PYTHON=python3
|
||||
${PYTHON} -c "${code}" 2> /dev/null
|
||||
} || {
|
||||
echo "Linter requires black 19.3b0 or higher!"
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user