From a17ee4baae4af559b066e40d5443c07540046327 Mon Sep 17 00:00:00 2001 From: Alexey Stepanov Date: Wed, 21 Nov 2018 14:29:03 +0100 Subject: [PATCH 1/3] Temporary: do not cythonize gevent on windows: strange issues Signed-off-by: Alexey Stepanov --- setup.py | 2 +- test/test_gevent_threadpooled.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 7a9569d..0b0a2c6 100644 --- a/setup.py +++ b/setup.py @@ -59,11 +59,11 @@ def _extension(modpath: str) -> setuptools.Extension: setuptools.Extension("threaded._asynciotask", ["threaded/_asynciotask.pyx"]), setuptools.Extension("threaded._threaded", ["threaded/_threaded.pyx"]), _extension("threaded._threadpooled"), - _extension("threaded._gthreadpooled"), ] if "win32" != sys.platform: requires_optimization.append(_extension("threaded.__init__")) + requires_optimization.append(_extension("threaded._gthreadpooled")) # noinspection PyCallingNonCallable ext_modules = ( diff --git a/test/test_gevent_threadpooled.py b/test/test_gevent_threadpooled.py index 369cfff..19914d4 100644 --- a/test/test_gevent_threadpooled.py +++ b/test/test_gevent_threadpooled.py @@ -26,7 +26,7 @@ @unittest.skipIf(gevent is None, "No gevent") -class TestThreadPooled(unittest.TestCase): +class TestGeventThreadPooled(unittest.TestCase): def tearDown(self): threaded.GThreadPooled.shutdown() From 93a745a1d987e3e1e1f6c3fbfd6b3c3e387b8c13 Mon Sep 17 00:00:00 2001 From: Alexey Stepanov Date: Wed, 21 Nov 2018 14:40:33 +0100 Subject: [PATCH 2/3] Temporary: do not cythonize Signed-off-by: Alexey Stepanov --- azure-pipelines.yml | 168 ++++++++++++++++++++++---------------------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ec31b8d..a73bb63 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -35,87 +35,87 @@ jobs: - template: .azure_pipelines/run_tests.yml parameters: {name: 'Python_37', python: '3.7', architecture: 'x64', kind: 'native'} -- template: .azure_pipelines/run_tests.yml - parameters: {name: 'Python_34', python: '3.4', architecture: 'x64', kind: 'cython'} -- template: .azure_pipelines/run_tests.yml - parameters: {name: 'Python_34', python: '3.4', architecture: 'x86', kind: 'cython'} -- template: .azure_pipelines/run_tests.yml - parameters: {name: 'Python_35', python: '3.5', architecture: 'x64', kind: 'cython'} -- template: .azure_pipelines/run_tests.yml - parameters: {name: 'Python_35', python: '3.5', architecture: 'x86', kind: 'cython'} -- template: .azure_pipelines/run_tests.yml - parameters: {name: 'Python_36', python: '3.6', architecture: 'x64', kind: 'cython'} -- template: .azure_pipelines/run_tests.yml - parameters: {name: 'Python_36', python: '3.6', architecture: 'x86', kind: 'cython'} -- template: .azure_pipelines/run_tests.yml - parameters: {name: 'Python_37', python: '3.7', architecture: 'x64', kind: 'cython'} -- template: .azure_pipelines/run_tests.yml - parameters: {name: 'Python_37', python: '3.7', architecture: 'x86', kind: 'cython'} - -- job: 'Build_and_deploy' - dependsOn: - - Python_34_x64_native - - Python_35_x64_native - - Python_36_x64_native - - Python_37_x64_native - - - Python_34_x64_cython - - Python_34_x86_cython - - Python_35_x64_cython - - Python_35_x86_cython - - Python_36_x64_cython - - Python_36_x86_cython - - Python_37_x64_cython - - Python_37_x86_cython - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) - pool: - vmIMage: 'VS2017-Win2016' - strategy: - maxParallel: 6 - matrix: - Python34_x64: - python.version: '3.4' - Python34_x86: - python.version: '3.4' - python.architecture: 'x86' - Python35_x64: - python.version: '3.5' - Python35_x86: - python.version: '3.5' - python.architecture: 'x86' - Python36_x64: - python.version: '3.6' - Python36_x86: - python.version: '3.6' - python.architecture: 'x86' - Python37_x64: - python.version: '3.7' - Python37_x86: - python.version: '3.7' - python.architecture: 'x86' - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: '$(python.architecture)' - - - script: | - python -m pip install --upgrade pip - pip install -U setuptools - pip install -r build_requirements.txt - displayName: 'Install dependencies' - - - script: | - python setup.py bdist_wheel - displayName: 'Build' - - - task: TwineAuthenticate@0 - displayName: 'Twine Authenticate ' - inputs: - externalFeeds: PyPI - - - script: | - pip install -U twine - twine upload -r PyPI --config-file $(PYPIRC_PATH) dist/Advanced_Descriptors-* --skip-existing - displayName: 'Deploy' +#- template: .azure_pipelines/run_tests.yml +# parameters: {name: 'Python_34', python: '3.4', architecture: 'x64', kind: 'cython'} +#- template: .azure_pipelines/run_tests.yml +# parameters: {name: 'Python_34', python: '3.4', architecture: 'x86', kind: 'cython'} +#- template: .azure_pipelines/run_tests.yml +# parameters: {name: 'Python_35', python: '3.5', architecture: 'x64', kind: 'cython'} +#- template: .azure_pipelines/run_tests.yml +# parameters: {name: 'Python_35', python: '3.5', architecture: 'x86', kind: 'cython'} +#- template: .azure_pipelines/run_tests.yml +# parameters: {name: 'Python_36', python: '3.6', architecture: 'x64', kind: 'cython'} +#- template: .azure_pipelines/run_tests.yml +# parameters: {name: 'Python_36', python: '3.6', architecture: 'x86', kind: 'cython'} +#- template: .azure_pipelines/run_tests.yml +# parameters: {name: 'Python_37', python: '3.7', architecture: 'x64', kind: 'cython'} +#- template: .azure_pipelines/run_tests.yml +# parameters: {name: 'Python_37', python: '3.7', architecture: 'x86', kind: 'cython'} +# +#- job: 'Build_and_deploy' +# dependsOn: +# - Python_34_x64_native +# - Python_35_x64_native +# - Python_36_x64_native +# - Python_37_x64_native +# +# - Python_34_x64_cython +# - Python_34_x86_cython +# - Python_35_x64_cython +# - Python_35_x86_cython +# - Python_36_x64_cython +# - Python_36_x86_cython +# - Python_37_x64_cython +# - Python_37_x86_cython +# condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) +# pool: +# vmIMage: 'VS2017-Win2016' +# strategy: +# maxParallel: 6 +# matrix: +# Python34_x64: +# python.version: '3.4' +# Python34_x86: +# python.version: '3.4' +# python.architecture: 'x86' +# Python35_x64: +# python.version: '3.5' +# Python35_x86: +# python.version: '3.5' +# python.architecture: 'x86' +# Python36_x64: +# python.version: '3.6' +# Python36_x86: +# python.version: '3.6' +# python.architecture: 'x86' +# Python37_x64: +# python.version: '3.7' +# Python37_x86: +# python.version: '3.7' +# python.architecture: 'x86' +# +# steps: +# - task: UsePythonVersion@0 +# inputs: +# versionSpec: '$(python.version)' +# architecture: '$(python.architecture)' +# +# - script: | +# python -m pip install --upgrade pip +# pip install -U setuptools +# pip install -r build_requirements.txt +# displayName: 'Install dependencies' +# +# - script: | +# python setup.py bdist_wheel +# displayName: 'Build' +# +# - task: TwineAuthenticate@0 +# displayName: 'Twine Authenticate ' +# inputs: +# externalFeeds: PyPI +# +# - script: | +# pip install -U twine +# twine upload -r PyPI --config-file $(PYPIRC_PATH) dist/Advanced_Descriptors-* --skip-existing +# displayName: 'Deploy' From f2f52c3788d410a61943172bebf258a6bf26af3b Mon Sep 17 00:00:00 2001 From: Alexey Stepanov Date: Wed, 21 Nov 2018 14:48:49 +0100 Subject: [PATCH 3/3] Windows: no cythonize (temporary) Signed-off-by: Alexey Stepanov --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0b0a2c6..088d78f 100644 --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ def _extension(modpath: str) -> setuptools.Extension: always_allow_keywords=True, binding=True, embedsignature=True, overflowcheck=True, language_level=3 ), ) - if cythonize is not None + if cythonize is not None and "win32" != sys.platform else [] )