Skip to content

Commit

Permalink
Adding Python 2.7 to build
Browse files Browse the repository at this point in the history
Combine Mac and regular setup

Working on Python 2.7

Combining and checking for Windows

Enable more builds

Fix bug
  • Loading branch information
henryiii committed Apr 19, 2019
1 parent 33733a3 commit d3313a4
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 24 deletions.
14 changes: 0 additions & 14 deletions .ci/azure-macos-setup.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .ci/azure-publish-dist.yml
Expand Up @@ -2,7 +2,7 @@
steps:
- task: PublishPipelineArtifact@0
inputs:
artifactName: '$(Agent.OS)_$(Agent.JobName)_$(python.architecture)_artifact'
artifactName: '$(Agent.OS)_$(Agent.JobName)_$(python.architecture)'
targetPath: 'dist'

# You can set FULLBUILD_FORCE to anything non-blank to get the manylinux job to run.
Expand Down
12 changes: 10 additions & 2 deletions .ci/azure-setup.yml
@@ -1,14 +1,22 @@
# This is special for macOS because "UsePythonVersion"
# does not use the official Python.org installers.

steps:

- script: .ci/macos-install-python.sh '$(python.version)'
displayName: Install Python.org Python
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))

- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: '$(python.architecture)'
condition: and(succeeded(), ne(variables['Agent.OS'], 'Darwin'))

- script: |
mkdir -p dist
python -m pip install --upgrade pip
python -m pip install --upgrade pytest wheel twine
python -m pip install --upgrade pytest wheel twine setuptools
python -m pip install -r dev-requirements.txt
mkdir -p dist
displayName: 'Install dependencies'

16 changes: 16 additions & 0 deletions .ci/azure-steps.yml
@@ -1,8 +1,18 @@
steps:

- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" $(python.architecture)
set MSSdk=1
set DISTUTILS_USE_SDK=1
python -m pip wheel . -w wheelhouse/
displayName: 'Build wheel (Windows Python 2.7)'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['python.version'], '2.7'))

- script: |
python -m pip wheel . -w wheelhouse/
displayName: 'Build wheel'
condition: and(succeeded(), not(and(eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['python.version'], '2.7'))))

- script: |
ls -lh wheelhouse
mkdir -p dist
Expand All @@ -23,3 +33,9 @@ steps:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'
condition: succeededOrFailed()

- script: |
python -m pip install delocate
/Library/Frameworks/Python.framework/Versions/$(python.version)/bin/delocate-wheel dist/$(package_name)*.whl
displayName: 'Delocate wheels'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
13 changes: 7 additions & 6 deletions azure-pipelines.yml
Expand Up @@ -98,30 +98,31 @@ jobs:
vmImage: 'macOS-10.14'
steps:
- template: .ci/azure-submodules.yml
- template: .ci/azure-macos-setup.yml
- template: .ci/azure-setup.yml
- template: .ci/azure-steps.yml
- script: |
python -m pip install delocate
/Library/Frameworks/Python.framework/Versions/$(python.version)/bin/delocate-wheel dist/$(package_name)*.whl
displayName: 'Delocate wheels'
- template: .ci/azure-publish-dist.yml

- job: Windows
strategy:
matrix:
Python27:
python.version: '2.7'
python.architecture: 'x64'
Python36:
python.version: '3.6'
python.architecture: 'x64'
Python37:
python.version: '3.7'
python.architecture: 'x64'
Python27_32:
python.version: '2.7'
python.architecture: 'x86'
Python36_32:
python.version: '3.6'
python.architecture: 'x86'
Python37_32:
python.version: '3.7'
python.architecture: 'x86'
# Python 2.7 requires VS9, but that's too old
pool:
vmImage: 'vs2017-win2016'
steps:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -96,7 +96,7 @@ def cpp_flag(compiler):
class BuildExt(build_ext):
"""A custom build extension for adding compiler-specific options."""
c_opts = {
'msvc': ['/EHsc'],
'msvc': ['/EHsc', '/bigobj'],
'unix': [],
}

Expand Down

0 comments on commit d3313a4

Please sign in to comment.