You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by fo...@apache.org on 2020/02/19 08:10:04 UTC
[avro] branch master updated: AVRO-2747: Remove setup_requires
(#818)
This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new 3812985 AVRO-2747: Remove setup_requires (#818)
3812985 is described below
commit 3812985c2d4219815c0521dc193fdf811afba0dc
Author: Michael A. Smith <mi...@smith-li.com>
AuthorDate: Wed Feb 19 03:09:52 2020 -0500
AVRO-2747: Remove setup_requires (#818)
---
lang/py/build.sh | 4 ++--
lang/py/setup.cfg | 13 -------------
lang/py/setup.py | 23 -----------------------
lang/py/tox.ini | 28 ++++++++++++++++++++++++++++
4 files changed, 30 insertions(+), 38 deletions(-)
diff --git a/lang/py/build.sh b/lang/py/build.sh
index 9df3539..6121606 100755
--- a/lang/py/build.sh
+++ b/lang/py/build.sh
@@ -51,11 +51,11 @@ interop-data-test() {
}
lint() {
- ./setup.py isort lint
+ tox -e lint
}
test_() {
- tox
+ TOX_SKIP_ENV=lint tox --skip-missing-interpreters
}
main() {
diff --git a/lang/py/setup.cfg b/lang/py/setup.cfg
index 5c32c9b..0cc0344 100644
--- a/lang/py/setup.cfg
+++ b/lang/py/setup.cfg
@@ -47,9 +47,6 @@ package_dir =
avro.test = avro/test
avro.tether = avro/tether
include_package_data = true
-setup_requires =
- isort
- pycodestyle
install_requires =
zip_safe = true
scripts =
@@ -73,13 +70,3 @@ zstandard = zstandard
[aliases]
dist = sdist --dist-dir ../../dist/py
-
-[isort]
-line_length = 150
-known_third_party=zope
-
-[pycodestyle]
-exclude = .eggs,.tox,build
-ignore = E101,E111,E114,E121,E122,E124,E125,E126,E127,E128,E129,E201,E202,E203,E222,E226,E225,E231,E241,E251,E261,E262,E265,E266,E301,E302,E303,E305,E306,E402,E501,E701,E703,E704,E711,W191,W291,W292,W293,W391,W503,W504,W601
-max-line-length = 150
-statistics = True
diff --git a/lang/py/setup.py b/lang/py/setup.py
index 43c97db..34b26c5 100755
--- a/lang/py/setup.py
+++ b/lang/py/setup.py
@@ -121,35 +121,12 @@ def _get_version():
return verfile.read().rstrip().replace("-", "+")
-class LintCommand(setuptools.Command):
- """Run pycodestyle on all your modules"""
- description = __doc__
- user_options = [] # type: ignore
-
- def initialize_options(self):
- pass
-
- def finalize_options(self):
- pass
-
- def run(self):
- # setuptools does not seem to make pycodestyle available
- # in the pythonpath, so we do it ourselves.
- try:
- env = {'PYTHONPATH': next(glob.iglob('.eggs/pycodestyle-*.egg'))}
- except StopIteration:
- env = None # pycodestyle is already installed
- p = subprocess.Popen(['python', '-m', 'pycodestyle', '.'], close_fds=True, env=env)
- if p.wait():
- raise distutils.errors.DistutilsError("pycodestyle exited with a nonzero exit code.")
-
def main():
if not _is_distribution():
_generate_package_data()
setuptools.setup(cmdclass={
"generate_interop_data": GenerateInteropDataCommand,
- "lint": LintCommand,
})
diff --git a/lang/py/tox.ini b/lang/py/tox.ini
index b9b2c46..87adcbc 100644
--- a/lang/py/tox.ini
+++ b/lang/py/tox.ini
@@ -14,9 +14,17 @@
# limitations under the License.
[tox]
+# Remember to run tox --skip-missing-interpreters
+# If you don't want to install all these interpreters.
envlist =
+ lint
py27
py35
+ py36
+ py37
+ py38
+ pypy3.5
+ pypy3.6
[coverage:run]
source =
@@ -43,3 +51,23 @@ commands =
commands_post =
coverage combine
coverage report
+
+[testenv:lint]
+deps =
+ isort
+ pycodestyle
+commands_pre =
+commands =
+ isort --check-only
+ pycodestyle
+commands_post =
+
+[tool:isort]
+line_length = 150
+known_third_party=zope
+
+[pycodestyle]
+exclude = .eggs,.tox,build
+ignore = E101,E111,E114,E121,E122,E124,E125,E126,E127,E128,E129,E201,E202,E203,E222,E226,E225,E231,E241,E251,E261,E262,E265,E266,E301,E302,E303,E305,E306,E402,E501,E701,E703,E704,E711,W191,W291,W292,W293,W391,W503,W504,W601
+max-line-length = 150
+statistics = True