mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-08 22:04:17 +00:00
add cmd script only on windows (as per issue #22 specification)
This commit is contained in:
parent
bb3dcbd321
commit
557feff3eb
1 changed files with 6 additions and 1 deletions
7
setup.py
7
setup.py
|
|
@ -1,11 +1,15 @@
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
ispy3 = sys.version_info[0] == 3
|
ispy3 = sys.version_info[0] == 3
|
||||||
|
iswin = os.name == 'nt'
|
||||||
|
|
||||||
kwargs = {}
|
kwargs = {}
|
||||||
scripts = ["flake8/flake8"]
|
scripts = ["flake8/flake8"]
|
||||||
if ispy3:
|
if ispy3:
|
||||||
from distutils.core import setup # NOQA
|
from distutils.core import setup # NOQA
|
||||||
|
if iswin:
|
||||||
|
scripts.append("scripts/flake8.cmd")
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
from setuptools import setup # NOQA
|
from setuptools import setup # NOQA
|
||||||
|
|
@ -18,7 +22,8 @@ else:
|
||||||
}
|
}
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from distutils.core import setup # NOQA
|
from distutils.core import setup # NOQA
|
||||||
scripts.append("scripts/flake8.cmd")
|
if iswin:
|
||||||
|
scripts.append("scripts/flake8.cmd")
|
||||||
|
|
||||||
from flake8 import __version__
|
from flake8 import __version__
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue