From 3c40bd2a68f036fe27feefa94b87f7235eb0a481 Mon Sep 17 00:00:00 2001 From: opacam Date: Sun, 26 Apr 2020 10:46:23 +0200 Subject: [PATCH 1/2] :rotating_light: Fix linting for setup.py - F401 'os' imported but unused - E303 too many blank lines (3) - E302 expected 2 blank lines, found 1 - E305 expected 2 blank lines after class or function definition, found 1 - E251 unexpected spaces around keyword / parameter equals --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index f22aeec80c..d59d630797 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,6 @@ from io import open # for open(..,encoding=...) parameter in python 2 from os import walk from os.path import join, dirname, sep -import os import re from setuptools import setup, find_packages @@ -17,7 +16,6 @@ data_files = [] - # must be a single statement since buildozer is currently parsing it, refs: # https://github.com/kivy/buildozer/issues/722 install_reqs = [ @@ -27,6 +25,7 @@ ] # (pep517 and toml are used by pythonpackage.py) + # By specifying every file manually, package_data will be able to # include them in binary distributions. Note that we have to add # everything as a 'pythonforandroid' rule, using '' apparently doesn't @@ -42,6 +41,7 @@ def recursively_include(results, directory, patterns): results[directory] = [] results[directory].append(join(*filename.split(sep)[1:])) + recursively_include(package_data, 'pythonforandroid/recipes', ['*.patch', 'Setup*', '*.pyx', '*.py', '*.c', '*.h', '*.mk', '*.jam', ]) @@ -104,7 +104,7 @@ def recursively_include(results, directory, patterns): 'aar = pythonforandroid.bdistapk:BdistAAR', ], }, - classifiers = [ + classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', From 919e67686b396ba2a32956d0a7c937df8629b0eb Mon Sep 17 00:00:00 2001 From: opacam Date: Sun, 26 Apr 2020 12:14:15 +0200 Subject: [PATCH 2/2] :ok_hand: Add setup.py to flake8 tests --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 4e69dd89b6..76da905c69 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ commands = [testenv:pep8] deps = flake8 -commands = flake8 pythonforandroid/ tests/ ci/ +commands = flake8 pythonforandroid/ tests/ ci/ setup.py [flake8] ignore =