"test/vscode:/vscode.git/clone" did not exist on "34b53ee70fbb2735798ba58b43db705ffdbbe41a"
Commit 8047ccd2 authored by rusty1s's avatar rusty1s
Browse files

create wheel

parent ae88f6b1
...@@ -3,15 +3,14 @@ import boto3 ...@@ -3,15 +3,14 @@ import boto3
s3_resource = boto3.resource('s3') s3_resource = boto3.resource('s3')
bucket = s3_resource.Bucket(name="pytorch-scatter") bucket = s3_resource.Bucket(name="pytorch-scatter")
objects = bucket.objects.all() objects = bucket.objects.all()
wheels = sorted([obj.key[4:] for obj in objects if obj.key[:3] == 'whl']) wheels = sorted([obj.key[4:] for obj in objects if obj.key[-3:] == 'whl'])
print(wheels)
# <!DOCTYPE html>
# <html>
# <body>
# <a href="/frob/">frob</a>
# <a href="/spamspamspam/">spamspamspam</a>
# </body>
# </html>
content = '<!DOCTYPE html>\n<html>\n<body>\n{}\n</body>\n</html>'
url = 'https://pytorch-scatter.s3.eu-central-1.amazonaws.com/whl/{}.whl' url = 'https://pytorch-scatter.s3.eu-central-1.amazonaws.com/whl/{}.whl'
links = ['<a href="{}">{}</a><br/>'.format(url.format(w), w) for w in wheels]
content = content.format('\n'.join(links))
with open('index.html', 'w') as f:
f.write(content)
bucket.Object('whl/index.html').upload_file(Filename='index.html')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment