mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-31 11:16:54 +00:00
Prepare moving Pyflakes as an extension: setuptools becomes mandatory
This commit is contained in:
parent
debc186594
commit
8a50be88b3
1 changed files with 13 additions and 29 deletions
42
setup.py
42
setup.py
|
|
@ -1,33 +1,8 @@
|
|||
import sys
|
||||
import os
|
||||
|
||||
ispy3 = sys.version_info[0] == 3
|
||||
iswin = os.name == 'nt'
|
||||
|
||||
kwargs = {}
|
||||
scripts = ["flake8/flake8"]
|
||||
if ispy3:
|
||||
from distutils.core import setup # NOQA
|
||||
if iswin:
|
||||
scripts.append("scripts/flake8.cmd")
|
||||
else:
|
||||
try:
|
||||
from setuptools import setup # NOQA
|
||||
kwargs = {
|
||||
'entry_points': {
|
||||
'distutils.commands': ['flake8 = flake8.main:Flake8Command'],
|
||||
'console_scripts': ['flake8 = flake8.main:main']
|
||||
},
|
||||
'tests_require': ['nose'],
|
||||
'test_suite': 'nose.collector',
|
||||
}
|
||||
except ImportError:
|
||||
from distutils.core import setup # NOQA
|
||||
if iswin:
|
||||
scripts.append("scripts/flake8.cmd")
|
||||
from setuptools import setup
|
||||
|
||||
from flake8 import __version__
|
||||
|
||||
scripts = ["flake8/flake8"]
|
||||
README = open('README.rst').read()
|
||||
|
||||
setup(
|
||||
|
|
@ -42,7 +17,11 @@ setup(
|
|||
url="http://bitbucket.org/tarek/flake8",
|
||||
packages=["flake8", "flake8.tests"],
|
||||
scripts=scripts,
|
||||
install_requires=["pyflakes==0.6.1", "pep8==1.4.2"],
|
||||
install_requires=[
|
||||
"setuptools",
|
||||
"pyflakes==0.6.1",
|
||||
"pep8==1.4.2",
|
||||
],
|
||||
long_description=README,
|
||||
classifiers=[
|
||||
"Environment :: Console",
|
||||
|
|
@ -52,5 +31,10 @@ setup(
|
|||
"Topic :: Software Development",
|
||||
"Topic :: Utilities",
|
||||
],
|
||||
**kwargs
|
||||
entry_points={
|
||||
'distutils.commands': ['flake8 = flake8.main:Flake8Command'],
|
||||
'console_scripts': ['flake8 = flake8.main:main']
|
||||
},
|
||||
tests_require=['nose'],
|
||||
test_suite='nose.collector',
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue