Fix all PEP-008 issues

This commit is contained in:
Nicola Soranzo
2020-02-14 15:50:06 +00:00
parent 1e420a9b57
commit cab6ecef24
34 changed files with 175 additions and 65 deletions
+3 -2
View File
@@ -1,9 +1,10 @@
import os
import utils
project_dir = os.path.dirname(__file__)
def test():
# build the wheels
actual_wheels = utils.cibuildwheel_run(project_dir)
@@ -20,6 +21,6 @@ def test_build_identifiers():
# can be multiple wheels for each wheel, though, so we need to limit
# the expected wheels
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0')
if not '-manylinux' in w or '-manylinux1' in w]
if '-manylinux' not in w or '-manylinux1' in w]
build_identifiers = utils.cibuildwheel_get_build_identifiers(project_dir)
assert len(expected_wheels) == len(build_identifiers)
+4 -1
View File
@@ -1,6 +1,9 @@
import os
from setuptools import setup, Extension
from setuptools import (
Extension,
setup,
)
if os.environ.get('CIBUILDWHEEL', '0') != '1':
raise Exception('CIBUILDWHEEL environment variable is not set to 1')
+5 -1
View File
@@ -1,7 +1,11 @@
import os, subprocess
import os
import subprocess
import pytest
import utils
def test():
project_dir = os.path.dirname(__file__)
+4 -1
View File
@@ -1,4 +1,7 @@
from setuptools import setup, Extension
from setuptools import (
Extension,
setup,
)
setup(
name="spam",
+1
View File
@@ -1,4 +1,5 @@
from unittest import TestCase
import spam
@@ -1,6 +1,8 @@
import os
import utils
def test():
project_dir = os.path.dirname(__file__)
+7 -2
View File
@@ -1,5 +1,10 @@
from setuptools import setup, Extension
import sys, os
import os
import sys
from setuptools import (
Extension,
setup,
)
# assert that the Python version as written to pythonversion.txt in the CIBW_BEFORE_BUILD step
# is the same one as is currently running.
+2
View File
@@ -1,6 +1,8 @@
import os
import utils
def test():
project_dir = os.path.dirname(__file__)
+5 -1
View File
@@ -1,6 +1,10 @@
from setuptools import setup, Extension
import sys
from setuptools import (
Extension,
setup,
)
# explode if run on Python 2.7 or Python 3.4 (these should be skipped)
if sys.version_info[0:2] == (2, 7):
raise Exception('Python 2.7 should not be built')
+2
View File
@@ -1,6 +1,8 @@
import os
import utils
def test():
project_dir = os.path.dirname(__file__)
+6 -3
View File
@@ -1,5 +1,9 @@
from setuptools import setup, Extension
import sys, os
import os
from setuptools import (
Extension,
setup,
)
# explode if environment isn't correct, as set in CIBW_ENVIRONMENT
CIBW_TEST_VAR = os.environ.get('CIBW_TEST_VAR')
@@ -15,7 +19,6 @@ if '/opt/cibw_test_path' not in PATH:
if '$PATH' in PATH:
raise Exception('$PATH should be expanded in PATH. It was "%s"' % PATH)
setup(
name="spam",
ext_modules=[Extension('spam', sources=['spam.c'])],
+5 -1
View File
@@ -1,6 +1,10 @@
import os, pytest
import os
import pytest
import utils
def test():
project_dir = os.path.dirname(__file__)
+6 -2
View File
@@ -1,6 +1,10 @@
import os, sys
import os
import sys
from setuptools import setup, Extension
from setuptools import (
Extension,
setup,
)
# check that we're running in the correct docker image as specified in the
# environment options CIBW_MANYLINUX1_*_IMAGE
+2
View File
@@ -1,6 +1,8 @@
import os
import utils
def test():
project_dir = os.path.dirname(__file__)
# this test checks that SSL is working in the build environment using
+5 -1
View File
@@ -1,6 +1,10 @@
import ssl
import sys
from setuptools import setup, Extension
from setuptools import (
Extension,
setup,
)
if sys.version_info[0] == 2:
from urllib2 import urlopen
@@ -1,4 +1,7 @@
import os, pytest
import os
import pytest
import utils
+4 -1
View File
@@ -1,4 +1,7 @@
from setuptools import setup, Extension
from setuptools import (
Extension,
setup,
)
setup(
name="spam",
+2 -1
View File
@@ -1,9 +1,10 @@
import os
import utils
project_dir = os.path.dirname(__file__)
def test():
# build the wheels
actual_wheels = utils.cibuildwheel_run(project_dir)
+4 -4
View File
@@ -1,7 +1,7 @@
import os
from setuptools import setup, Extension
from setuptools import (
Extension,
setup,
)
setup(
ext_modules=[Extension('spam.spam', sources=['spam/spam.c'])],
+1 -1
View File
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.0"
+5 -3
View File
@@ -4,10 +4,12 @@ Utility functions used by the cibuildwheel tests.
This file is added to the PYTHONPATH in the test runner at bin/run_test.py.
'''
import subprocess, sys, os, shutil
from tempfile import mkdtemp
import os
import shutil
import subprocess
import sys
from contextlib import contextmanager
from tempfile import mkdtemp
IS_WINDOWS_RUNNING_ON_AZURE = os.path.exists('C:\\hostedtoolcache')
IS_WINDOWS_RUNNING_ON_TRAVIS = os.environ.get('TRAVIS_OS_NAME') == 'windows'