<p>它不起作用的原因是通过自制程序安装的wxPython版本不是32位的。您需要从wxPython主页安装dmg。我在那里找到了一个脚本:<a href="https://github.com/ayufan/travis-osx-vm-templates/blob/master/scripts/packages.sh" rel="nofollow">https://github.com/ayufan/travis-osx-vm-templates/blob/master/scripts/packages.sh</a></p>
<p>我把你的例子分成两部分,并设法使它运行(<a href="https://github.com/paulmueller/macapp/releases" rel="nofollow">https://github.com/paulmueller/macapp/releases</a>)。在</p>
<p>一。特拉维斯·伊梅尔现在看起来像这样:</p>
<pre><code>language: objective-c
python:
- '2.7'
before_install:
- which python
- brew install python universal framework
- brew install wget
- which python
- export VERSIONER_PYTHON_PREFER_32_BIT=yes
- defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
- which python
- python version
# https://github.com/Homebrew/homebrew/issues/34470
#- arch -i386 brew install wxpython universal
- mkdir dl
- cd dl
- wget http://downloads.sourceforge.net/wxpython/wxPython3.0-osx-3.0.2.0-cocoa-py2.7.dmg
- ls
- cd ..
- sudo ./packages.sh
- arch -i386 python -c "import wx; print wx.__version__"
- arch -i386 pip install pyinstaller
- arch -i386 pyinstaller noconsole onefile hw.py
- ls
- hdiutil create dist/hw.dmg -srcfolder dist/ -ov
- zip -r dist/hw.zip dist/hw.app
- ls dist/
install: true
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: KjdN4hSHWU3ZDg6lpDNMB2we9jLayM9C8pwyQrV/Xzq8HNH5eNHP8ScI64tvnS0yJegOXnHFwUhUrkMtEs3X29TKrom+8tJ5E52IdBO7xO8fqOfeugC2239vLzc3tNI6RJX/K7CZTsSRu5U++1RJVgcWYjrCln87DuXG+HZRdOI=
file:
- "dist/hw.dmg"
- "dist/hw.zip"
on:
tags: true
all_branches: true
repo: paulmueller/macapp
</code></pre>