Skip to content
This repository was archived by the owner on Jan 26, 2023. It is now read-only.

Commit f7bbc2b

Browse files
authored
Merge pull request #152 from randomir/shape-up-for-release
Shape up for release
2 parents f866563 + d8a652e commit f7bbc2b

File tree

6 files changed

+21
-405
lines changed

6 files changed

+21
-405
lines changed

.appveyor.yml

Lines changed: 17 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,48 @@
1-
# clone directory
2-
clone_folder: C:\projects\qbsolv
3-
41
environment:
5-
global:
6-
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
7-
# /E:ON and /V:ON options are not enabled in the batch script intepreter
8-
# See: http://stackoverflow.com/a/13751649/163740
9-
CMD_IN_ENV: "cmd /E:ON /V:ON /C %APPVEYOR_BUILD_FOLDER%\\ci\\appveyor\\run_with_env.cmd"
102

113
# PyPI login
12-
username: dwtools
13-
password:
4+
TWINE_USERNAME: dwtools
5+
TWINE_PASSWORD:
146
secure: 9/YAQhmz9Kb1ZeXzhBYeQA==
157

168
matrix:
179
- PYTHON: "C:\\Python35"
18-
PYTHON_VERSION: "3.5.x"
19-
PYTHON_ARCH: "32"
20-
2110
- PYTHON: "C:\\Python35-x64"
22-
PYTHON_VERSION: "3.5.x"
23-
PYTHON_ARCH: "64"
24-
2511
- PYTHON: "C:\\Python36"
26-
PYTHON_VERSION: "3.6.x"
27-
PYTHON_ARCH: "32"
28-
2912
- PYTHON: "C:\\Python36-x64"
30-
PYTHON_VERSION: "3.6.x"
31-
PYTHON_ARCH: "64"
32-
3313
- PYTHON: "C:\\Python37"
34-
PYTHON_VERSION: "3.7.x"
35-
PYTHON_ARCH: "32"
36-
3714
- PYTHON: "C:\\Python37-x64"
38-
PYTHON_VERSION: "3.7.x"
39-
PYTHON_ARCH: "64"
40-
4115
- PYTHON: "C:\\Python38"
42-
PYTHON_VERSION: "3.8.x"
43-
PYTHON_ARCH: "32"
44-
4516
- PYTHON: "C:\\Python38-x64"
46-
PYTHON_VERSION: "3.8.x"
47-
PYTHON_ARCH: "64"
4817

4918
install:
50-
# If there is a newer build queued for the same PR, cancel this one.
51-
# The AppVeyor 'rollout builds' option is supposed to serve the same
52-
# purpose but it is problematic because it tends to cancel builds pushed
53-
# directly to master instead of just PR builds (or the converse).
54-
# credits: JuliaLang developers.
55-
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
56-
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
57-
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
58-
throw "There are newer queued builds for this pull request, failing early." }
59-
- ECHO "Filesystem root:"
60-
- ps: "ls \"C:/\""
61-
62-
- ECHO "Installed SDKs:"
63-
- ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
64-
65-
# Install Python (from the official .msi of http://python.org) and pip when
66-
# not already installed.
67-
- ps: if (-not(Test-Path($env:PYTHON))) { & ci\appveyor\install.ps1 }
68-
69-
# Prepend newly installed Python to the PATH of this build (this cannot be
70-
# done from inside the powershell script as it would require to restart
71-
# the parent CMD process).
72-
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
19+
# required to link py35 (x86 and x64)
20+
- set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\8.1\bin\x86
7321

7422
# Check that we have the expected version and architecture for Python
75-
- "python --version"
76-
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
77-
78-
# Upgrade to the latest version of pip to avoid it displaying warnings
79-
# about it being out of date.
80-
# - "pip install --disable-pip-version-check --user --upgrade pip"
23+
- "%PYTHON%\\python.exe --version"
24+
- "%PYTHON%\\python.exe -c \"import struct; print(struct.calcsize('P') * 8)\""
8125

82-
# Install the build dependencies of the project. If some dependencies contain
83-
# compiled extensions and are not provided as pre-built wheel packages,
84-
# pip will build them from source using the MSVC compiler matching the
85-
# target Python version and architecture
86-
- "%CMD_IN_ENV% pip install -r requirements.txt -r tests\\requirements.txt"
87-
- "%CMD_IN_ENV% pip install wheel setuptools --upgrade --force"
26+
# install dependencies
27+
- "%PYTHON%\\python.exe -m pip install -r requirements.txt -r tests\\requirements.txt"
28+
- "%PYTHON%\\python.exe -m pip install wheel twine"
8829

8930
build_script:
90-
# Build the compiled extension
91-
- "%CMD_IN_ENV% python setup.py bdist_wheel"
92-
- pip install dwave_qbsolv --no-index -f dist\\
31+
# build the compiled extension and install qbsolv
32+
- "%PYTHON%\\python.exe setup.py build_ext --inplace"
33+
- "%PYTHON%\\python.exe -m pip install ."
9334

9435
test_script:
95-
# Run the project tests
96-
- python -m unittest discover
97-
36+
- "%PYTHON%\\python.exe -m unittest discover"
37+
9838
after_test:
99-
# If tests are successful, create binary packages for the project.
100-
#- "%CMD_IN_ENV% python setup.py bdist_wininst"
101-
#- "%CMD_IN_ENV% python setup.py bdist_msi"
39+
# If tests are successful, create binary wheels
40+
- "%PYTHON%\\python.exe setup.py bdist_wheel"
10241
- ps: "ls dist"
10342

10443
artifacts:
10544
# Archive the generated packages in the ci.appveyor.com build report.
10645
- path: dist\*
10746

10847
deploy_script:
109-
- "echo [pypi] > %USERPROFILE%\\.pypirc"
110-
- "echo username: %username% >> %USERPROFILE%\\.pypirc"
111-
- "echo password: %password% >> %USERPROFILE%\\.pypirc"
112-
- "%CMD_IN_ENV% pip install twine"
113-
- cmd: "if [%APPVEYOR_REPO_TAG%]==[true] twine upload --skip-existing dist\\*.whl"
48+
- cmd: "if [%APPVEYOR_REPO_TAG%]==[true] if NOT [%CPPDEBUG%]==[1] %PYTHON%\\Scripts\\twine upload --skip-existing dist\\*.whl"

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
name: build wheels
172172
command: |
173173
for PYBIN in /opt/python/*/bin; do
174-
if "${PYBIN}/python" -c "import sys; sys.exit(sys.version_info>=(3, 5))"; then continue; fi;
174+
"${PYBIN}/python" -c "import sys; sys.exit((3,5)<=sys.version_info<(3,9))" && continue
175175
"${PYBIN}/pip" install -r requirements.txt -r tests/requirements.txt
176176
"${PYBIN}/pip" wheel . -w ./wheelhouse
177177
"${PYBIN}/python" setup.py sdist -d ./dist

ci/appveyor/install.ps1

Lines changed: 0 additions & 229 deletions
This file was deleted.

0 commit comments

Comments
 (0)