Skip to content

Commit

Permalink
Transition to Python 3.8 (#557)
Browse files Browse the repository at this point in the history
* Python 3.8

* Update requirements.txt

* use tag for python3.8 ayab fork

---------

Co-authored-by: dl1com <1631996+dl1com@users.noreply.github.com>
  • Loading branch information
t0mpr1c3 and dl1com authored Aug 1, 2023
1 parent 16af9f2 commit 6fe73c1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-multi-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6]
python-version: [3.8]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.6]
python-version: [3.8]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -316,7 +316,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: [3.6]
python-version: [3.8]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -423,7 +423,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6]
python-version: [3.8]
steps:
- name: Checkout repo into AppDir
uses: actions/checkout@v3
Expand All @@ -439,7 +439,7 @@ jobs:
echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT
echo "python=python${{matrix.python-version}}" >> $GITHUB_OUTPUT
echo "manifest=$(cat src/main/resources/base/ayab/firmware/manifest.txt)" >> $GITHUB_OUTPUT
echo "python-appimage=python${{matrix.python-version}}.15-cp36-cp36m-manylinux2014_x86_64.AppImage" >> $GITHUB_OUTPUT
echo "python-appimage=python${{matrix.python-version}}.17-cp38-cp38-manylinux2014_x86_64.AppImage" >> $GITHUB_OUTPUT
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6]
python-version: [3.8]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ build:osx:
when: always
paths:
- dist/release/
script:
script:
- mac-build/build.sh
after_script:
- ls -lisa dist/release
only:
- tags

build:linux:
image: python:3.6
image: python:3.8
tags:
- linux
- docker
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ For information on how to install the release version of the software, see

## Running from Source & Development

The AYAB desktop software runs using Python 3.6. This is not the current
The AYAB desktop software runs using Python 3.8. This is not the current
version of Python, so it is recommended to install the software to a
virtual environment. Miniconda provides a virtual environment that is
platform-independent and easy to use: download the lastest version from
Expand Down Expand Up @@ -51,7 +51,7 @@ To install the development version you can checkout the git repository.

Create a virtual environment for AYAB:

conda create --name ayab -c conda-forge python=3.6 pip
conda create --name ayab -c conda-forge python=3.8 pip

Now activate the virtual environment. The command prompt should now display
`(ayab)` at the beginning of each line.
Expand Down Expand Up @@ -82,7 +82,7 @@ Now you can download the git repository with:

Next, create a virtual environment for AYAB:

conda create --name ayab -c conda-forge python=3.6 pip
conda create --name ayab -c conda-forge python=3.8 pip

Activate the virtual environment. The command prompt should now display
`(ayab)` at the beginning of each line.
Expand Down Expand Up @@ -110,7 +110,7 @@ Now start AYAB with:

*If on Apple Silicon (M1 & M2 chips)*

* You will need to install the virtual environment using the x86_64 versions of packages due to the requirement of Python 3.6 (which has no build in Conda due to it predating Apple silicon). In order to do this, you need to set the terminal to fetch packages built for x86_64 architectures rather than the native arm64. In Applications, go to the Utilities folder and right click on the Terminal app, and choosing `Get Info`. Select the `Open using Rosetta` checkbox and close the window. Check that the change has taken place by opening the terminal and entering the command `arch`. This should return `i386` if everything went correctly.
* You will need to install the virtual environment using the x86_64 versions of packages due to the requirement of Python 3.8 (which has no build in Conda due to it predating Apple silicon). In order to do this, you need to set the terminal to fetch packages built for x86_64 architectures rather than the native arm64. In Applications, go to the Utilities folder and right click on the Terminal app, and choosing `Get Info`. Select the `Open using Rosetta` checkbox and close the window. Check that the change has taken place by opening the terminal and entering the command `arch`. This should return `i386` if everything went correctly.
* Installing both native and rosetta versions of packages can cause conflicts. You can remove conflicting packages from homebrew by specifying architecture and using the remove command: `arch=arm64 brew remove xyz`.

You can install Git using Homebrew:
Expand All @@ -128,7 +128,7 @@ Next download the git repository:

Create a virtual environment for AYAB:

conda create --name ayab -c conda-forge python=3.6 pip
conda create --name ayab -c conda-forge python=3.8 pip

Now activate the virtual environment. The command prompt should now display
`(ayab)` at the beginning of each line.
Expand Down
2 changes: 1 addition & 1 deletion linux-build/appimage/AppRun
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export TK_LIBRARY="${APPDIR}/usr/share/tcltk/tk8.5"
export TKPATH="${TK_LIBRARY}"

cd $APPDIR
opt/python3.6/bin/fbs run
opt/python3.8/bin/fbs run
6 changes: 2 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
fbs~=1.2
PyInstaller~=3.4
pyqt5==5.9.2
fbs @ git+https://github.com/AllYarnsAreBeautiful/fbs@1.2.1-py38
Pillow==7.1.2
pyserial~=3.4
sliplib==0.4.0
pytest==5.4.1
mock==3.0.5
bitarray-hardbyte==1.1.0
simpleaudio==1.0.2
simpleaudio==1.0.4
wave==0.0.2
numpy
requests
Expand Down

0 comments on commit 6fe73c1

Please sign in to comment.