Skip to content

Commit

Permalink
build: get build working on python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ong committed Dec 29, 2023
1 parent 77ab78e commit 40f2f9f
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ on:
jobs:
build:

runs-on: windows-latest
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # This is important for the Git history
- name: Set up Python 3.7
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.7
architecture: 'x86' # we dont support x64
python-version: 3.11
architecture: 'x64' # we dont support x86
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: [3.11]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pre-commit
python -m pip install --upgrade pre-commit==3.6.0
- name: Lint
run: pre-commit run --all-files
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
/dist/
config.json
/main.spec

/NESTrisOCR*zip
/changelog.txt
/scripts/build-windows/last-tag.txt
Empty file added nestris_ocr/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion nestris_ocr/utils/program_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def init_args():
"--calibrate", help="Run calibrator rather than scanner", action="store_true"
)
parser.add_argument("--defaultconfig", default=None)
args = parser.parse_args()
args, unknown = parser.parse_known_args()


if args is None:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
autobahn[twisted]==23.6.2
autobahn[twisted]==21.3.1
cached-property==1.5.2
numba==0.58.1
numpy==1.26.2
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-windows/build-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cd ..\..\scripts\build-windows
rem the following spec file assumes we don't need llvmlite since we've excluded numba.
copy main.spec ..\..\main.spec
cd ..\..
pyinstaller -D main.spec
pyinstaller main.spec

rem copy the scripts to run the program
copy scripts\build-windows\dist\calibrate.bat dist\
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-windows/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
autobahn[twisted]==23.6.2
autobahn[twisted]==21.3.1
cached-property==1.5.2
numba==0.58.1
numpy==1.26.2
Expand All @@ -9,7 +9,7 @@ websockets==12.0
pyobjc; sys_platform == "darwin"
pypiwin32; sys_platform == "win32"
tkmacosx; sys_platform == "darwin"
pyinstaller==5.13.1
pyinstaller==5.13.2
zip-files==0.4.1
gitchangelog==3.0.4
pystache==0.6.5

0 comments on commit 40f2f9f

Please sign in to comment.