mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-14 16:34:46 +00:00
Update setup.py
This commit is contained in:
parent
de96b24bad
commit
6553198074
2 changed files with 13 additions and 12 deletions
|
|
@ -0,0 +1,5 @@
|
||||||
|
[aliases]
|
||||||
|
test=pytest
|
||||||
|
|
||||||
|
[bdist_wheel]
|
||||||
|
universal=1
|
||||||
20
setup.py
20
setup.py
|
|
@ -1,6 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
from setuptools import setup
|
import setuptools
|
||||||
|
|
||||||
|
import flake8
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Work around a traceback with Nose on Python 2.6
|
# Work around a traceback with Nose on Python 2.6
|
||||||
# http://bugs.python.org/issue15881#msg170215
|
# http://bugs.python.org/issue15881#msg170215
|
||||||
|
|
@ -16,18 +19,11 @@ except ImportError:
|
||||||
mock = None
|
mock = None
|
||||||
|
|
||||||
|
|
||||||
tests_require = ['nose']
|
tests_require = ['pytest']
|
||||||
if mock is None:
|
if mock is None:
|
||||||
tests_require += ['mock']
|
tests_require += ['mock']
|
||||||
|
|
||||||
|
|
||||||
def get_version(fname='flake8/__init__.py'):
|
|
||||||
with open(fname) as f:
|
|
||||||
for line in f:
|
|
||||||
if line.startswith('__version__'):
|
|
||||||
return eval(line.split('=')[-1])
|
|
||||||
|
|
||||||
|
|
||||||
def get_long_description():
|
def get_long_description():
|
||||||
descr = []
|
descr = []
|
||||||
for fname in ('README.rst', 'CHANGES.rst'):
|
for fname in ('README.rst', 'CHANGES.rst'):
|
||||||
|
|
@ -36,10 +32,10 @@ def get_long_description():
|
||||||
return '\n\n'.join(descr)
|
return '\n\n'.join(descr)
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setuptools.setup(
|
||||||
name="flake8",
|
name="flake8",
|
||||||
license="MIT",
|
license="MIT",
|
||||||
version=get_version(),
|
version=flake8.__version__,
|
||||||
description="the modular source code checker: pep8, pyflakes and co",
|
description="the modular source code checker: pep8, pyflakes and co",
|
||||||
# long_description=get_long_description(),
|
# long_description=get_long_description(),
|
||||||
author="Tarek Ziade",
|
author="Tarek Ziade",
|
||||||
|
|
@ -71,5 +67,5 @@ setup(
|
||||||
"Topic :: Software Development :: Quality Assurance",
|
"Topic :: Software Development :: Quality Assurance",
|
||||||
],
|
],
|
||||||
tests_require=tests_require,
|
tests_require=tests_require,
|
||||||
test_suite='nose.collector',
|
setup_requires=['pytest-runner'],
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue