-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48b05a8
commit 80a4cf7
Showing
10 changed files
with
178 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
$ErrorActionPreference = 'Stop'; | ||
|
||
|
||
$packageName= 'vcpython27' | ||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
$url = 'https://web.archive.org/web/20210106040224if_/https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi' | ||
|
||
$packageArgs = @{ | ||
packageName = $packageName | ||
unzipLocation = $toolsDir | ||
fileType = 'msi' | ||
url = $url | ||
|
||
silentArgs = "ALLUSERS=1 /qn /norestart /l*v `"$env:TEMP\chocolatey\$($packageName)\$($packageName).MsiInstall.log`"" | ||
validExitCodes= @(0, 3010, 1641) | ||
|
||
softwareName = 'Microsoft Visual C++ Compiler Package for Python 2.7' | ||
checksum = '4e6342923a8153a94d44ff7307fcdd1f' | ||
checksumType = 'md5' | ||
} | ||
|
||
|
||
|
||
Install-ChocolateyPackage @packageArgs |
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,49 @@ | ||
|
||
|
||
$ErrorActionPreference = 'Stop'; | ||
|
||
$packageName = 'vcpython27' | ||
$softwareName = 'Microsoft Visual C++ Compiler Package for Python 2.7' | ||
$installerType = 'MSI' | ||
|
||
$silentArgs = '/qn /norestart' | ||
$validExitCodes = @(0, 3010, 1605, 1614, 1641) | ||
if ($installerType -ne 'MSI') { | ||
$validExitCodes = @(0) | ||
} | ||
|
||
$uninstalled = $false | ||
$local_key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' | ||
$machine_key = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*' | ||
$machine_key6432 = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' | ||
|
||
$key = Get-ItemProperty -Path @($machine_key6432,$machine_key, $local_key) ` | ||
-ErrorAction SilentlyContinue ` | ||
| ? { $_.DisplayName -like "$softwareName" } | ||
|
||
if ($key.Count -eq 1) { | ||
$key | % { | ||
$file = "$($_.UninstallString)" | ||
|
||
if ($installerType -eq 'MSI') { | ||
$silentArgs = "$($_.PSChildName) $silentArgs" | ||
|
||
$file = '' | ||
} | ||
|
||
Uninstall-ChocolateyPackage -PackageName $packageName ` | ||
-FileType $installerType ` | ||
-SilentArgs "$silentArgs" ` | ||
-ValidExitCodes $validExitCodes ` | ||
-File "$file" | ||
} | ||
} elseif ($key.Count -eq 0) { | ||
Write-Warning "$packageName has already been uninstalled by other means." | ||
} elseif ($key.Count -gt 1) { | ||
Write-Warning "$key.Count matches found!" | ||
Write-Warning "To prevent accidental data loss, no programs will be uninstalled." | ||
Write-Warning "Please alert package maintainer the following keys were matched:" | ||
$key | % {Write-Warning "- $_.DisplayName"} | ||
} | ||
|
||
|
Binary file not shown.
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,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. --> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | ||
<metadata> | ||
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages --> | ||
<id>vcpython27</id> | ||
<title>Microsoft Visual C++ Compiler for Python 2.7</title> | ||
<version>9.0.0.30729</version> | ||
<authors>Microsoft</authors> | ||
<owners>fredrikaverpil</owners> | ||
<summary>This package contains the compiler and set of system headers necessary for producing binary wheels for Python 2.7 packages.</summary> | ||
<description>This package contains the compiler and set of system headers necessary for producing binary wheels for Python 2.7 packages. | ||
</description> | ||
<projectUrl>https://www.microsoft.com/en-us/download/details.aspx?id=44266</projectUrl> | ||
<packageSourceUrl>https://www.microsoft.com/en-us/download/details.aspx?id=44266</packageSourceUrl> | ||
<docsUrl>https://www.microsoft.com/en-us/download/details.aspx?id=44266</docsUrl> | ||
<!--<projectSourceUrl></projectSourceUrl>--> | ||
<!--<mailingListUrl></mailingListUrl>--> | ||
<!--<bugTrackerUrl></bugTrackerUrl>--> | ||
<tags>vcpython27 admin python compiler</tags> | ||
<copyright>Microsoft</copyright> | ||
<licenseUrl>https://www.microsoft.com/en-us/download/details.aspx?id=44266</licenseUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<!--<iconUrl>http://cdn.rawgit.com/__REPLACE_YOUR_REPO__/master/icons/vcpython27.png</iconUrl>--> | ||
<dependencies> | ||
<dependency id="vcredist2008" version="9.0.30729.6161" /> | ||
<dependency id="dotnet3.5" version="3.5.20140403" /> | ||
</dependencies> | ||
<releaseNotes>https://github.com/fredrikaverpil/vcpython27/releases</releaseNotes> | ||
<!--<provides></provides>--> | ||
</metadata> | ||
<files> | ||
<file src="tools\**" target="tools" /> | ||
</files> | ||
</package> |
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,45 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Python Tests | ||
|
||
on: | ||
push: | ||
branches: [ "master", "dev" ] | ||
pull_request: | ||
branches: [ "master", "dev" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["2.7", "3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup MSVC for Python 2.7 | ||
if: ${{ runner.os == 'Windows' && matrix.python-version == '2.7' }} | ||
run: | | ||
choco install vcpython27 -fd --ignore-dependencies --source=".github\workflows\custom" -y | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install cython | ||
- name: Run Unit Tests | ||
run: | | ||
python -m unittest discover tests -v | ||
- name: Run Cython Ext Unit Tests | ||
run: | | ||
python setup.py build_ext --inplace | ||
python -m unittest discover tests -v |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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