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

Support for Python version 3.12 and 3.13 #1465

Merged
merged 30 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fc6f754
Add support for Python 3.12 and 3.13
DivingDuck Nov 16, 2024
a1b23d5
Windows builds with all supported Python versions at Github activated…
DivingDuck Nov 17, 2024
5ac5cff
Merge branch 'kliment:master' into PythonSupport3.12_3.13
DivingDuck Nov 25, 2024
1c172fb
Better processing for outdated modules regarding workarounds, add wor…
DivingDuck Nov 25, 2024
e08c323
Python 3.13 no longer experimental due to pyglet version 1.5.30 update
DivingDuck Dec 12, 2024
acf930d
Build package macos-12 is depreciated. Remove macos-12 and dd macos-1…
DivingDuck Dec 12, 2024
04960e3
remove py 3.10
DivingDuck Dec 12, 2024
6fb0047
One more fix for macOS
DivingDuck Dec 12, 2024
5b886fc
Merge branch 'kliment:master' into PythonSupport3.12_3.13
DivingDuck Jan 20, 2025
2ca468d
Merge branch 'kliment:master' into PythonSupport3.12_3.13
DivingDuck Jan 31, 2025
1999b4a
Python 3.13 as default version for local Windows builds, Build packag…
DivingDuck Feb 6, 2025
08fd892
Merge branch 'kliment:master' into PythonSupport3.12_3.13
DivingDuck Feb 6, 2025
1736836
Update translation files
DivingDuck Feb 6, 2025
9813c87
Update default Python version to 3.13 for Windows and add some more i…
DivingDuck Feb 11, 2025
b0646fc
Add new chapter Translating Pronterface
DivingDuck Feb 11, 2025
0ed353f
Restrict plattform builds for macos-13 to Python 3.11 and macos-14 to…
DivingDuck Feb 12, 2025
aef6e2a
Add translation files to macos distribution package
DivingDuck Feb 12, 2025
df5004d
add missing |
DivingDuck Feb 12, 2025
14d4ee0
Merge branch 'kliment:master' into PythonSupport3.12_3.13
DivingDuck Feb 14, 2025
c25929d
Chapter Translating Pronterface: Fix typos,more explanation, rearrang…
DivingDuck Feb 14, 2025
df27f75
Add README.md to the binary distribution package for Windows and macOS
DivingDuck Feb 14, 2025
0b4b69c
Add Allow the application to run on Windows
DivingDuck Feb 14, 2025
4a17015
Fix problem with generating the translation file and f"..." strings …
DivingDuck Feb 14, 2025
a9c36d8
Update all translation files because of code changes. Translation for…
DivingDuck Feb 14, 2025
59b18f8
Merge branch 'kliment:master' into PythonSupport3.12_3.13
DivingDuck Feb 18, 2025
96f80ef
Change log string
DivingDuck Feb 16, 2025
d12d9b1
macOS: search translation folder and files on the same place where th…
DivingDuck Feb 18, 2025
d629ce6
More work on chapter Translating Pronterface
DivingDuck Feb 18, 2025
73e2b7b
Update translation
DivingDuck Feb 18, 2025
191ba73
Add copy of README.md to distribution folder
DivingDuck Feb 18, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-12]
os: [ubuntu-22.04, windows-2022, macos-13]

steps:
- uses: actions/checkout@v4
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/buildpackage-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ jobs:

strategy:
matrix:
os: [macos-12]
os: [macos-13,macos-14]
architecture: [x64]
python-version: ['3.10']
python-version: ['3.11','3.13']
exclude:
- os: macos-13
python-version: '3.13'
- os: macos-14
python-version: '3.11'

steps:
- name: Checkout
Expand Down Expand Up @@ -53,6 +58,11 @@ jobs:
cd dist
zip -r -X Pronterface-app.zip Pronterface.app

- name: Copy translation files
run: |
cp -r locale dist
cp README.md dist/

- name: Configuration for releases
if: ${{ github.event_name == 'release' }}
run: |
Expand All @@ -72,7 +82,10 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ env.EXE_NAME }}
path: dist/Pronterface-app.zip
path: |
dist/Pronterface-app.zip
dist/README.md
dist/locale

upload_release_assets:
needs: [build]
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/buildpackage-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ jobs:
os: [windows-latest]
# supported architecture: [x64, x86]
architecture: [x86, x64]
# supported versions: ['3.8', '3.9', '3.10', '3.11']
# for x86 only Python 3.9 to 3.11 is supported
python-version: ['3.10']
# supported versions: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
# for x86 only Python 3.9 to 3.13 is supported
# Python 3.13t is not supported
python-version: ['3.8', '3.13']

steps:
- name: Checkout
Expand Down Expand Up @@ -64,6 +65,7 @@ jobs:
- name: Copy translation files
run: |
cp -r locale dist
cp README.md dist/

- name: Configuration for releases
if: ${{ github.event_name == 'release' }}
Expand All @@ -87,6 +89,7 @@ jobs:
path: |
dist/Pronterface.exe
dist/Pronsole.exe
dist/README.md
dist/locale

upload_release_assets:
Expand Down
40 changes: 40 additions & 0 deletions CleanCacheFiles.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
echo off
rem **************************************************************
rem *** This batch file will clean up all __pycache__ folders, ***
rem *** *.pyd files and left over gcoder_line files from ***
rem *** previous builds. For Windows only. ***
rem *** ***
rem *** This is helpful when you switch between Python ***
rem *** versions or you have problems with incompatible ***
rem *** library files. ***
rem *** ***
rem *** Don't forget to delete the virtual environment v3 ***
rem *** if you switch between Python versions. ***
rem *** ***
rem *** Author: DivingDuck, 2024-11-16, Status: working ***
rem **************************************************************

echo *** Clean pip cache ***
if exist v3 (
call v3\Scripts\activate
echo *** Activate virtual environment v3 ***
)

pip cache purge

echo *** Clean all __pycache__ folders ***

for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"

if exist v3 (
call v3\Scripts\deactivate
echo *** Deactivate virtual environment v3 ***
)

echo *** clean gcoder_line files ***
if exist printrun\gcoder_line.c del printrun\gcoder_line.c && echo *** delete printrun\gcoder_line.c deleted ***
if exist printrun\gcoder_line.cp???-win_amd??.pyd del printrun\gcoder_line.cp???-win_amd??.pyd && echo *** printrun\gcoder_line.cp???-win_amd??.pyd deleted ***
if exist printrun\gcoder_line.cp???-win??.pyd del printrun\gcoder_line.cp???-win??.pyd && echo *** printrun\gcoder_line.cp???-win??.pyd deleted ***
if exist printrun\gcoder_line.cp??-win_amd??.pyd del printrun\gcoder_line.cp??-win_amd??.pyd && echo *** printrun\gcoder_line.cp??-win_amd??.pyd deleted ***
if exist printrun\gcoder_line.cp??-win??.pyd del printrun\gcoder_line.cp??-win??.pyd && echo *** printrun\gcoder_line.cp??-win??.pyd deleted ***
pause
82 changes: 80 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The contents of this document are organized in the following sections:
+ [Linux packages from official repositories](#linux-packages-from-official-repositories)
+ [Printrun package from PyPI](#printrun-package-from-pypi)
* [Running From Source](#running-from-source)
* [Translating Pronterface](#translating-pronterface)
- [Using Printrun](#using-printrun)
* [Using Pronterface](#using-pronterface)
* [Using Pronsole](#using-pronsole)
Expand Down Expand Up @@ -58,7 +59,15 @@ available at: https://github.com/kliment/Printrun/releases/latest

#### Important: Allow the application to run on macOS

macOS will block Printrun from running because it is not from a verified developer. [Please read this wiki article](https://github.com/kliment/Printrun/wiki/macOS-Apple-could-not-verify) to learn how to allow the application to start. You only need to do this once for each new version.
macOS will block Printrun from running because it is not from a verified developer.
[Please read this wiki article](https://github.com/kliment/Printrun/wiki/macOS-Apple-could-not-verify)
to learn how to allow the application to start. You only need to do this once for each new version.

#### Important: Allow the application to run on Windows

Windows will block Printrun from running because it is not from a verified developer.
[Please read this wiki FAQ article](https://github.com/kliment/Printrun/wiki/FAQ#malware-virus-or-trojan-detection-defender-smartscreen-and-firewall-warnings)
to learn how to allow the application to start. You only need to do this once for each new version.

### Linux packages from official repositories

Expand Down Expand Up @@ -195,7 +204,9 @@ With your virtual environment still active, invoke the app you need like:

### Windows

First download and install [GIT for Windows](https://git-scm.com/downloads), [Python 3.10](https://www.python.org/downloads/) and a [C-compiler environment](https://wiki.python.org/moin/WindowsCompilers/).
For running or compiling Pronterface from source we need first download and install [GIT for Windows](https://git-scm.com/downloads), [Python 3.13](https://www.python.org/downloads/) and a [C-compiler environment](https://wiki.python.org/moin/WindowsCompilers/). We use Visual Studio 2022 with workloads for Python and C++ installed.
Please consult `release_windows.bat` in case you want to use other Python versions. Currently supported are all versions from 3.8 to 3.13 except the free-threaded versions of 3.12 and 3.13. The default version is actual set to 3.13.

For the next steps we need a CMD window or a PowerShell window. You can use Windows Terminal for this as well.
Create and navigate to a directory of your choice where you want to download the source files of this repository and follow the next steps:

Expand Down Expand Up @@ -223,6 +234,73 @@ You need to adjust the path to your location of pronsole.exe.

Run 'release_windows.bat' when ever you make changes or updates. With each new run it will compile the binaries and update all involved libraries in the virtual environment if needed. Delete the virtual environment if you have problems with it.

## Translating Pronterface

Pronterface supports the localization of the GUI in your language. We would be more
than happy if users support us with updated translation files in all different
languages. Actually we have translation files for AR, DE, FR, HY, IT and NL available,
but only the translation DE is complete. Generate a new issue in our repository and
ask us if you need an additional translation file that is not available jet.

The easiest way updating our translation files is to use a free version of the tool
Poedit (https://poedit.net/). The software is available for Linux, macOS and Windows.

A set of existing translation files is already included in the distributed pre-compiled
binaries for Windows and macOS. You need only to open the pronterface.po of the
corresponding language folder and save the file. This will generate the needed
pronterface.mo for a working translation.

### How to update a translation

The best way is to clone first our repository and then work on the translation file
local. Send us a pull request when you have finished your work. Doing the translation
in steps is also OK, please mention it in the PR. We will then wait with releasing
your update up to the point you tell us you have finished your work.

The translation is organized in the folder `\locale` and includes sub folders for each
supported language. The structure is mandatory and should not be changed. The file
`pronterface.po` contains all translatable strings and is the file to be edited for a
translation. The file `pronterface.mo` is the translation file from `pronterface.po`
file in binary format and is needed on that place for a functional translation in
Pronterface. It will be automatically generated if you use Poedit. Please do not send
this file as it is operating system dependent and should be generated on the OS used.
The file `pronterface.pot` is the master translation file and should not be modified.
We do update the translation files when ever this is needed, mostly due to source code
changes where translation is also involved or when we receive an updated translation.


Structure:
```
.\locale
\de
\LC_MESSAGES
pronterface.po
pronterface.mo
\it
\LC_MESSAGES
pronterface.po
pronterface.mo
...
pronterface.pot
```
Pronterface search for installed translation files on `/usr/share` for Linux. For
Windows and macOS it will find the folder `.\locale` on the same location where
the binaries are installed (where you will find them when you download the distributed
binaries).

Copy the updated folder `.\locale` over the same folder of your Pronterface
installation after you update a translation and then restart Ponterface.
The file pronterface.po is not needed for a functional translation but helpful,
if you want to work on your translation.

### Providing a new or updated translation

Please use always the latest version of files in our repository before providing
a new or updated translation. Open an issue and ask for help if you need further
support - we are glad to help.

Open an issue and attach the updated translation file `pronterface.po` or better,
make a pull request.

# USING PRINTRUN

Expand Down
Loading
Loading