Skip to content

Commit 720cb37

Browse files
authored
Merge 789a83e into cb7258a
2 parents cb7258a + 789a83e commit 720cb37

18 files changed

Lines changed: 1323 additions & 304 deletions

.github/workflows/testAndPublish.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ jobs:
4545
uses: actions/checkout@v4
4646
with:
4747
submodules: true
48-
- name: Install dependencies
49-
uses: actions/setup-python@v5
48+
- name: Install the latest version of uv
49+
uses: astral-sh/setup-uv@v5
5050
with:
51-
python-version: '3.11'
52-
architecture: x86
51+
python-version: cpython-3.11.12-windows-x86-none
5352
- name: Set version variables
5453
run: ci/scripts/setBuildVersionVars.ps1
5554
- name: Set scons args
@@ -62,7 +61,9 @@ jobs:
6261
- name: Cache scons build
6362
uses: actions/cache/save@v4
6463
with:
65-
path: ${{ github.workspace }}
64+
path: |
65+
${{ github.workspace }}
66+
!${{ github.workspace }}/.venv
6667
key: ${{ github.ref }}-${{ github.run_id }}
6768

6869
checkPot:
@@ -76,6 +77,10 @@ jobs:
7677
path: ${{ github.workspace }}
7778
key: ${{ github.ref }}-${{ github.run_id }}
7879
fail-on-cache-miss: true
80+
- name: Install the latest version of uv
81+
uses: astral-sh/setup-uv@v5
82+
with:
83+
python-version: cpython-3.11.12-windows-x86-none
7984
- name: Check comments for translators
8085
run: ci/scripts/tests/translationCheck.ps1
8186
- name: Upload artifact
@@ -98,6 +103,10 @@ jobs:
98103
path: ${{ github.workspace }}
99104
key: ${{ github.ref }}-${{ github.run_id }}
100105
fail-on-cache-miss: true
106+
- name: Install the latest version of uv
107+
uses: astral-sh/setup-uv@v5
108+
with:
109+
python-version: cpython-3.11.12-windows-x86-none
101110
- name: License check
102111
run: ci/scripts/tests/licenseCheck.ps1
103112

@@ -112,6 +121,10 @@ jobs:
112121
path: ${{ github.workspace }}
113122
key: ${{ github.ref }}-${{ github.run_id }}
114123
fail-on-cache-miss: true
124+
- name: Install the latest version of uv
125+
uses: astral-sh/setup-uv@v5
126+
with:
127+
python-version: cpython-3.11.12-windows-x86-none
115128
- name: Run unit tests
116129
run: ci/scripts/tests/unitTests.ps1
117130
- name: Replace relative paths in unit test results
@@ -145,6 +158,10 @@ jobs:
145158
path: ${{ github.workspace }}
146159
key: ${{ github.ref }}-${{ github.run_id }}
147160
fail-on-cache-miss: true
161+
- name: Install the latest version of uv
162+
uses: astral-sh/setup-uv@v5
163+
with:
164+
python-version: cpython-3.11.12-windows-x86-none
148165
- name: Set version variables
149166
run: ci/scripts/setBuildVersionVars.ps1
150167
- name: Set scons args
@@ -199,6 +216,10 @@ jobs:
199216
path: ${{ github.workspace }}
200217
key: ${{ github.ref }}-${{ github.run_id }}
201218
fail-on-cache-miss: true
219+
- name: Install the latest version of uv
220+
uses: astral-sh/setup-uv@v5
221+
with:
222+
python-version: cpython-3.11.12-windows-x86-none
202223
- name: Get NVDA launcher
203224
id: getLauncher
204225
uses: actions/download-artifact@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,5 @@ source/locale/*/cldr.dic
4949
nvdaHelper/docs/
5050
*.pfx
5151
appveyor-tools/
52+
uv.lock
53+
*.egg-info

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cpython-3.11-windows-x86-none

appveyor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ branches:
1414
- /release-.*/
1515

1616
environment:
17-
PY_PYTHON: 3.11-32
1817
apiSigningToken:
1918
secure: 8ARK3NZNRlz8VrhTbpTLP5GMnwbqlUN0DK4SYL4FUYSAAEgXUSB+MBcHHLa6JL9E
2019
secure_ssh_pass:
@@ -47,7 +46,6 @@ install:
4746
"INSTALL_START, $(Get-Date -Format 'o')"| Out-File ../timing.csv -Append
4847
- ps: appveyor\scripts\setBuildVersionVars.ps1
4948
- ps: appveyor\scripts\decryptFilesForSigning.ps1
50-
- py -m pip install --upgrade --no-warn-script-location pip
5149
- git submodule update --init
5250
- ps: |
5351
"INSTALL_END, $(Get-Date -Format 'o')"| Out-File ../timing.csv -Append

pyproject.toml

Lines changed: 88 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,41 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "nvda"
7+
dynamic = ["version"]
78
description = "NonVisual Desktop Access (NVDA)"
89
maintainers = [
910
{name = "NV Access", email = "info@nvaccess.org"},
1011
]
12+
requires-python = ">=3.11"
1113
classifiers = [
12-
"Development Status :: 5 - Production/Stable",
13-
"Intended Audience :: End Users/Desktop",
14-
"License :: OSI Approved :: GNU General Public License v2",
15-
"Operating System :: Microsoft :: Windows",
16-
"Programming Language :: Python :: 3",
17-
"Topic :: Accessibility",
14+
"Development Status :: 5 - Production/Stable",
15+
"Intended Audience :: End Users/Desktop",
16+
"License :: OSI Approved :: GNU General Public License v2",
17+
"Operating System :: Microsoft :: Windows",
18+
"Programming Language :: Python :: 3",
19+
"Topic :: Accessibility",
1820
]
1921
readme = "readme.md"
2022
license = {file = "copying.txt"}
23+
dependencies = [
24+
# NVDA's runtime dependencies
25+
"comtypes==1.4.6",
26+
"cryptography==44.0.1",
27+
"pyserial==3.5",
28+
"wxPython==4.2.2",
29+
"configobj",
30+
"requests==2.32.3",
31+
"url-normalize==1.4.3",
32+
"schedule==1.2.2",
33+
#NVDA_DMP requires diff-match-patch
34+
"fast-diff-match-patch==2.1.0",
35+
# typing_extensions are required for specifying default value for `TypeVar` prior to Python 3.13 (see PEP 696)
36+
"typing-extensions==4.12.2",
37+
# pycaw is a Core Audio Windows Library used for sound split
38+
"pycaw==20240210",
39+
# Sanitize HTML for browsable messages and documentation output to prevent XSS from translators
40+
"nh3==0.2.19",
41+
]
2142

2243
[project.urls]
2344
Homepage = "https://www.nvaccess.org/"
@@ -88,7 +109,6 @@ logger-objects = ["logHandler.log"]
88109
"winsound.PlaySound".msg= "PlaySound uses winmm, which is deprecated in favor of the Windows core audio APIs."
89110

90111
[tool.licensecheck]
91-
using = "requirements:requirements.txt"
92112
only_licenses = ["BSD", "MIT", "Python", "LGPLV3+", "Apache"]
93113
ignore_packages = [
94114
# Compatible licenses:
@@ -249,3 +269,64 @@ reportMissingParameterType = false # 4000+ errors
249269
reportUnknownVariableType = false # 6000+ errors
250270
reportUnknownArgumentType = false # 6000+ errors
251271
reportUnknownMemberType = false # 20000+ errors
272+
273+
[tool.uv]
274+
default-groups = [
275+
"dev",
276+
"docs",
277+
"lint",
278+
]
279+
python-preference = "only-managed"
280+
environments = ["sys_platform == 'win32'"]
281+
282+
[tool.setuptools.packages.find]
283+
where = ["source"] # list of folders that contain the packages (["."] by default)
284+
285+
[tool.uv.sources]
286+
configobj = { git = "https://github.com/DiffSK/configobj", rev = "8be54629ee7c26acb5c865b74c76284e80f3aa31" }
287+
288+
[dependency-groups]
289+
dev = [
290+
# NVDA's build system is SCons
291+
"SCons==4.8.1",
292+
# Packaging NVDA
293+
"py2exe==0.13.0.2",
294+
# l10nUtil requires Crowdin
295+
"crowdin-api-client==1.21.0",
296+
]
297+
lint = [
298+
"ruff==0.8.1",
299+
"pre-commit==4.0.1",
300+
"pyright==1.1.396",
301+
]
302+
license-check = [
303+
"licensecheck==2024.3",
304+
]
305+
docs = [
306+
# Building user documentation
307+
"Markdown==3.7",
308+
"mdx_truly_sane_lists==1.3",
309+
"markdown-link-attr-modifier==0.2.1",
310+
"mdx-gh-links==0.4",
311+
# For building developer documentation
312+
"sphinx==8.1.2",
313+
"sphinx_rtd_theme==3.0.1",
314+
]
315+
l10n = [
316+
# l10nUtil requires Crowdin
317+
"crowdin-api-client==1.21.0"
318+
]
319+
system-tests = [
320+
"robotframework==7.1.1",
321+
"robotremoteserver==1.1.1",
322+
"robotframework-screencaplibrary==1.6.0",
323+
]
324+
unit-tests = [
325+
# Creating XML unit test reports
326+
"unittest-xml-reporting==3.2.0",
327+
# Feed parameters to tests neatly
328+
"parameterized==0.9.0",
329+
]
330+
331+
[tool.setuptools.dynamic]
332+
version = {attr = "buildVersion.version_dev"}

requirements.txt

Lines changed: 0 additions & 57 deletions
This file was deleted.

runlicensecheck.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ rem Runs a license check for python dependencies
44
set hereOrig=%~dp0
55
set here=%hereOrig%
66
if #%hereOrig:~-1%# == #\# set here=%hereOrig:~0,-1%
7-
set scriptsDir=%here%\venvUtils
87

98
set checkArgs=
109
if "%1" NEQ "" set checkArgs=--file=%1 --format=markdown
11-
call "%scriptsDir%\venvCmd.bat" py -m licensecheck -0 --format ansi %checkArgs%
10+
call uv run --group license-check --directory "%here%" -m licensecheck -0 --format ansi %checkArgs%
1211
if ERRORLEVEL 1 exit /b %ERRORLEVEL%

runlint.bat

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ rem Lints and formats all python files
44
set hereOrig=%~dp0
55
set here=%hereOrig%
66
if #%hereOrig:~-1%# == #\# set here=%hereOrig:~0,-1%
7-
set scriptsDir=%here%\venvUtils
87

98
set ruffCheckArgs=
109
set ruffFormatArgs=
1110
if "%1" NEQ "" set ruffCheckArgs=--output-file=%1/PR-lint.xml --output-format=junit
1211
if "%1" NEQ "" set ruffFormatArgs=--diff > %1/lint-diff.diff
13-
call "%scriptsDir%\venvCmd.bat" ruff check --fix %ruffCheckArgs%
12+
call uv run --group lint --directory "%here%" ruff check --fix %ruffCheckArgs%
1413
if ERRORLEVEL 1 exit /b %ERRORLEVEL%
15-
call "%scriptsDir%\venvCmd.bat" ruff format %ruffFormatArgs%
14+
call uv run --group lint --directory "%here%" ruff format %ruffFormatArgs%
1615
if ERRORLEVEL 1 exit /b %ERRORLEVEL%
17-
call "%scriptsDir%\venvCmd.bat" pyright --threads --level warning
16+
call uv run --group lint --directory "%here%" pyright --threads --level warning
1817
if ERRORLEVEL 1 exit /b %ERRORLEVEL%

runnvda.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
set hereOrig=%~dp0
33
set here=%hereOrig%
44
if #%hereOrig:~-1%# == #\# set here=%hereOrig:~0,-1%
5-
set scriptsDir=%here%\venvUtils
65
set sourceDirPath=%here%\source
76

8-
call "%scriptsDir%\venvCmd.bat" start pyw "%sourceDirPath%\nvda.pyw" %*
7+
call uv run --directory "%sourceDirPath%" nvda.pyw %*

runsettingsdiff.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
set hereOrig=%~dp0
33
set here=%hereOrig%
44
if #%hereOrig:~-1%# == #\# set here=%hereOrig:~0,-1%
5-
set scriptsDir=%here%\venvUtils
65
set systemTestsPath=%here%\tests\system
76

8-
call "%scriptsDir%\venvCmd.bat" py -m robot --argumentfile "%systemTestsPath%\guiDiff.robot" %* "%systemTestsPath%\robot"
7+
call uv run --group system-tests --directory "%here%" -m robot --argumentfile "%systemTestsPath%\guiDiff.robot" %* "%systemTestsPath%\robot"

0 commit comments

Comments
 (0)