mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-12 15:44:17 +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
|
from setuptools import setup
|
||||||
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 flake8 import __version__
|
from flake8 import __version__
|
||||||
|
|
||||||
|
scripts = ["flake8/flake8"]
|
||||||
README = open('README.rst').read()
|
README = open('README.rst').read()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
|
@ -42,7 +17,11 @@ setup(
|
||||||
url="http://bitbucket.org/tarek/flake8",
|
url="http://bitbucket.org/tarek/flake8",
|
||||||
packages=["flake8", "flake8.tests"],
|
packages=["flake8", "flake8.tests"],
|
||||||
scripts=scripts,
|
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,
|
long_description=README,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Environment :: Console",
|
"Environment :: Console",
|
||||||
|
|
@ -52,5 +31,10 @@ setup(
|
||||||
"Topic :: Software Development",
|
"Topic :: Software Development",
|
||||||
"Topic :: Utilities",
|
"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