Skip to content

Commit

Permalink
Working on appveyor build step
Browse files Browse the repository at this point in the history
  • Loading branch information
djpugh committed Nov 15, 2018
1 parent 02c567d commit 6f2a31f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ after_test:
# Again, you only need if you're building C extensions for
# 64-bit Python 3.3/3.4. And you need to use %PYTHON% to get the correct
# interpreter
- cmd: IF %APPVEYOR_REPO_TAG% == 'True' (%PYTHON%\\python.exe setup.py bdist_wheel) ELSE (echo Not building because this is not a tag build)
- ps: if ($env:APPVEYOR_REPO_TAG -eq 'True') {ls dist}
- ps: if ($(& $env:PYTHON_EXE .\ci\get_version.py) -ne '') {& $env:PYTHON_EXE setup.py bdist_wheel} ELSE {echo "Not building because this is not a tag build"}
- ps: if ($LAST_EXIT_CODE -eq 'True') {ls dist}
artifacts:
# bdist_wheel puts your built wheel in the dist directory
- path: dist\*
Expand Down
4 changes: 2 additions & 2 deletions ci/get_appveyor_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
r.raise_for_status()
build = r.json()
job_ids = [job['jobId'] for job in build['jobs']]
if not os.path.exists(os.path.join(REPO_PATH, 'dist'))
os.mkdir(os.path.join(REPO_PATH, 'dist'))
if not os.path.exists(os.path.join(REPO_PATH, 'dist')):
os.mkdir(os.path.join(REPO_PATH, 'dist'))
for job_id in job_ids:
r = requests.get('{}/buildjobs/{}/artifacts'.format(api_url, job_id), headers=headers)
r.raise_for_status()
Expand Down
12 changes: 12 additions & 0 deletions ci/get_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import subprocess
import sys

import pkg_resources

version = pkg_resources.parse_version(subprocess.check_output([sys.executable, 'setup.py', '--version']).decode())
if version.local:
print('')
sys.exit(1)
else:
print(version)
sys.exit(0)

0 comments on commit 6f2a31f

Please sign in to comment.