-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cirrus: Use Python script to download & install wheels
Co-authored-by: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
- Loading branch information
Showing
2 changed files
with
24 additions
and
4 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,20 @@ | ||
import glob | ||
import io | ||
import os | ||
import subprocess | ||
from urllib.request import urlopen | ||
import zipfile | ||
|
||
CIRRUS_BUILD_ID = os.environ['CIRRUS_BUILD_ID'] | ||
ARTIFACTS_URL = f"https://api.cirrus-ci.com/v1/artifact/build/{CIRRUS_BUILD_ID}/build/dist.zip" | ||
|
||
with urlopen(ARTIFACTS_URL) as resp: | ||
zipdata = resp.read() | ||
|
||
with zipfile.ZipFile(io.BytesIO(zipdata)) as zf: | ||
zf.extractall() | ||
|
||
subprocess.run( | ||
['pip', 'install', *glob.glob('dist/*.whl')], | ||
check=True | ||
) |
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