Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasah committed Oct 4, 2023
1 parent 6d9ac69 commit c1ccc9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
# Used to host cibuildwheel
- uses: actions/setup-python@v4
with:
python-version: '3.12'
python-version: '3.11'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.1
Expand Down
10 changes: 3 additions & 7 deletions buildutils/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,16 @@ def localpath(*args):
return os.path.abspath(pjoin(*plist))


def fetch_archive(savedir, url, force=False):
def fetch_archive(savedir, url, fname, force=False):
"""download an archive to a specific location"""
req = urlopen(url)
# Lookup filename
fname = req.info().get_filename()
if not fname:
fname = os.path.basename(url)
dest = pjoin(savedir, fname)
if os.path.exists(dest) and not force:
print("already have %s" % fname)
return dest
print("fetching %s into %s" % (url, savedir))
if not os.path.exists(savedir):
os.makedirs(savedir)
req = urlopen(url)
with open(dest, "wb") as f:
f.write(req.read())
return dest
Expand All @@ -84,7 +80,7 @@ def fetch_libcapnp(savedir, url=None):
if os.path.exists(dest):
print("already have %s" % dest)
return
fname = fetch_archive(savedir, url)
fname = fetch_archive(savedir, url, libcapnp_name)
tf = tarfile.open(fname)
with_version = pjoin(savedir, tf.firstmember.path)
tf.extractall(savedir)
Expand Down

0 comments on commit c1ccc9a

Please sign in to comment.