File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 88import datetime
99import difflib
1010import glob
11+ import io
1112import os
1213import re
1314import shutil
1415import subprocess
1516import sys
17+ import tarfile
1618import tempfile
1719import textwrap
1820import time
21+ import urllib .request
1922from pathlib import Path
2023from typing import IO , Generator
2124
@@ -74,7 +77,9 @@ def tests(session: nox.Session) -> None:
7477 )
7578
7679
77- PROJECTS = {"packaging_legacy" : "https://github.com/di/packaging_legacy.git" }
80+ PROJECTS = {
81+ "packaging_legacy" : "https://github.com/di/packaging_legacy/archive/refs/tags/23.0.post0.tar.gz"
82+ }
7883
7984
8085@nox .parametrize ("project" , list (PROJECTS ))
@@ -86,8 +91,12 @@ def downstream(session: nox.Session, project: str) -> None:
8691 session .chdir (tmp_dir )
8792
8893 shutil .rmtree (project , ignore_errors = True )
89- session .run ("git" , "clone" , PROJECTS [project ], external = True )
90- session .chdir (project )
94+ with urllib .request .urlopen (PROJECTS [project ]) as resp :
95+ data = resp .read ()
96+ with tarfile .open (fileobj = io .BytesIO (data ), mode = "r:gz" ) as tf :
97+ tf .extractall (project )
98+ (inner_dir ,) = Path (project ).iterdir ()
99+ session .chdir (inner_dir )
91100
92101 if project == "packaging_legacy" :
93102 session .install ("-r" , "tests/requirements.txt" )
You can’t perform that action at this time.
0 commit comments