-
-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add license check script for incompatible licenses in pip dependencies (
#16753) NVDA is licensed with GPL2 which is incompatible with certain licenses like Apache. Currently there are 2 python dependencies bundled with NVDA with incompatible licenses: fast-diff-match-patch - see Reconsider fast_diff_match_path license violation workaround #16633 requests Description of user facing changes Developers can now check licenses with runlicensecheck.bat AppVeyor checks that new dependencies with incompatible licenses aren't introduced Description of development approach Using the licensecheck pip dependency, check licenses Similar to lint checks, run these checks on appveyor builds
- Loading branch information
Showing
11 changed files
with
80 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$licenseOutput = (Resolve-Path .\testOutput\license\) | ||
$licenseOutput = "$licenseOutput\licenseCheckResults.md" | ||
.\runlicensecheck.bat "$licenseOutput" | ||
if ($LastExitCode -ne 0) { | ||
Set-AppveyorBuildVariable "testFailExitCode" $LastExitCode | ||
Add-AppveyorMessage "FAIL: License check. See $licenseOutput for more information." | ||
} else { | ||
Add-AppveyorMessage "PASS: License check." | ||
} | ||
Push-AppveyorArtifact $licenseOutput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Pillow is an implicit dependency and requires zlib and jpeg by default, but we don't need it | ||
Pillow==10.3.0 -C "zlib=disable" -C "jpeg=disable" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo off | ||
rem runlicensecheck [<output file>] | ||
rem Runs a license check for python dependencies | ||
set hereOrig=%~dp0 | ||
set here=%hereOrig% | ||
if #%hereOrig:~-1%# == #\# set here=%hereOrig:~0,-1% | ||
set scriptsDir=%here%\venvUtils | ||
|
||
set checkArgs= | ||
if "%1" NEQ "" set checkArgs=--file=%1 --format=markdown | ||
call "%scriptsDir%\venvCmd.bat" py -m licensecheck -0 --format ansi %checkArgs% | ||
if ERRORLEVEL 1 exit /b %ERRORLEVEL% |