Skip to content

Commit

Permalink
Set AppVeyor to build wheels for Windows automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
cher-nov committed Jun 11, 2019
1 parent 313e95e commit 1b4c91c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
38 changes: 38 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
branches:
only:
- master

pull_requests:
do_not_increment_build_number: true

skip_non_tags: true
test: off

environment:
CIBW_SKIP: cp27-*
CIBW_BUILD_VERBOSITY: 3
BUILD_OUTPUT_PATH: wheelhouse
TWINE_USERNAME: cher-nov
TWINE_PASSWORD:
secure: hO+NR4mHqJGS/q3EBSvAgw==

install: |
git submodule update --init --recursive
pip install twine cibuildwheel
before_build: >
IF DEFINED CI_TEST_LAUNCH
SET "PYPI_SETUP_VERSION_SUFFIX=dev999%APPVEYOR_BUILD_ID%";
build_script: |
cibuildwheel --output-dir "%BUILD_OUTPUT_PATH%"
before_deploy: >
IF DEFINED CI_TEST_LAUNCH
SET "TWINE_REPOSITORY_URL=https://test.pypi.org/legacy/";
deploy_script: |
twine upload --skip-existing "%BUILD_OUTPUT_PATH%/*.whl"
artifacts:
- path: "%BUILD_OUTPUT_PATH%/*.whl"
6 changes: 2 additions & 4 deletions publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@ def main(argv):
# https://test.pypi.org/help/#file-name-reuse
# https://www.python.org/dev/peps/pep-0440/#developmental-releases
os.environ[ENVVAR_VERSION_SUFFIX] = "dev{}".format(int(time.time()))
twine_test_args = ("--repository-url", "https://test.pypi.org/legacy/")
else:
twine_test_args = ()
os.environ["TWINE_REPOSITORY_URL"] = "https://test.pypi.org/legacy/"

try:
execute("setup.py", "sdist")
#execute("setup.py", "bdist_wheel")
execute("twine", "upload", *twine_test_args, "dist/*", module=True)
execute("twine", "upload", "dist/*", module=True)
finally:
purge(True)

Expand Down

0 comments on commit 1b4c91c

Please sign in to comment.