Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Also integration test on macOS #1131

Merged
merged 1 commit into from
May 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ jobs:
run: docker run kivy/buildozer --version

Integration:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- 'ubuntu-latest'
- 'macOs-latest'
runs-on: ${{ matrix.os }}
steps:
- name: Setup python
uses: actions/setup-python@v2
Expand All @@ -60,8 +65,17 @@ jobs:
- run: buildozer init
- name: SDK, NDK and p4a download
run: |
sed "s/# android.accept_sdk_license = False/android.accept_sdk_license = True/" -i buildozer.spec
sed -i.bak "s/# android.accept_sdk_license = False/android.accept_sdk_license = True/" buildozer.spec
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sed in macOS doesn't work the same way as the one in Linux, the -i.bak is doing the trick to work on both

buildozer android p4a -- --help
# Install OS specific dependencies
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt -y install automake
- name: Install macOS dependencies
if: matrix.os == 'macOS-latest'
run: |
brew install automake
sudo ln -sfn /usr/local/opt/openssl /usr/local/ssl
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a workaround that could easily be integrated p4a side by patching Python to add /usr/local/opt/openssl to the search path.
I actually think it should be a CPython upstream fix, I may look into this in the future

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's interesting indeed. Did macOS move this recently? Anyway, seems like a good fix for CI purposes.

Is this something users are going to have problems with?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed user may have problem with it, even though I didn't directly see the problem yet on my macOS.
What I saw is without this fix the python3 config.log clearly show it didn't find the openssl lib. However later I didn't get the pip SSL error. However on the CI I do get the error 🤔
So yes I may pull request this CPython upstream because the fix is easy

- name: buildozer android debug
run: |
touch main.py
Expand Down
18 changes: 16 additions & 2 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ First, install the buildozer project with::
Targeting Android
-----------------

Android on Ubuntu 18.04 (64bit)
Android on Ubuntu 20.04 (64bit)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(expected to work as well in later version, but only regularly tested in the latest LTS)
Expand All @@ -28,6 +28,20 @@ Android on Ubuntu 18.04 (64bit)
export PATH=$PATH:~/.local/bin/


Android on macOS
~~~~~~~~~~~~~~~~

::

brew install openssl
sudo ln -sfn /usr/local/opt/openssl /usr/local/ssl
brew install pkg-config autoconf automake
python3 -m pip install --user --upgrade Cython==0.29.19 virtualenv # the --user should be removed if you do this in a venv

# add the following line at the end of your `~/.bashrc` file
export PATH=$PATH:~/Library/Python/3.7/bin


TroubleShooting
~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -72,4 +86,4 @@ Install pip and virtualenv

::

python -m pip install --user --upgrade pip virtualenv kivy-ios
python3 -m pip install --user --upgrade pip virtualenv kivy-ios