Skip to content

Commit abf63d1

Browse files
authored
Update the release scripts to deal with 3.8 and new filenames (#7732)
1 parent 4d332c5 commit abf63d1

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

misc/download-mypyc-wheels.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010

1111
PLATFORMS = [
12-
'macosx_10_6_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64',
12+
'macosx_10_{macos_ver}_x86_64',
1313
'manylinux1_x86_64',
1414
'win_amd64',
1515
]
1616
MIN_VER = 5
17-
MAX_VER = 7
17+
MAX_VER = 8
1818
BASE_URL = "https://github.com/mypyc/mypy_mypyc-wheels/releases/download"
19-
URL = "{base}/v{version}/mypy-{version}-cp3{pyver}-cp3{pyver}m-{platform}.whl"
19+
URL = "{base}/v{version}/mypy-{version}-cp3{pyver}-cp3{pyver}{abi_tag}-{platform}.whl"
2020

2121
def download(url):
2222
print('Downloading', url)
@@ -29,11 +29,15 @@ def download(url):
2929
def download_files(version):
3030
for pyver in range(MIN_VER, MAX_VER + 1):
3131
for platform in PLATFORMS:
32+
abi_tag = "" if pyver >= 8 else "m"
33+
macos_ver = 9 if pyver >= 8 else 6
3234
url = URL.format(
3335
base=BASE_URL,
3436
version=version,
3537
pyver=pyver,
36-
platform=platform)
38+
abi_tag=abi_tag,
39+
platform=platform.format(macos_ver=macos_ver)
40+
)
3741
# argh, there is an inconsistency here and I don't know why
3842
if 'win_' in platform:
3943
parts = url.rsplit('/', 1)

misc/upload-pypi.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,12 @@ def make_sdist(self) -> None:
124124

125125
def download_compiled_wheels(self) -> None:
126126
self.heading('Downloading wheels compiled with mypyc')
127-
self.run_in_virtualenv('misc/download-mypyc-wheels.py %s' % self.version)
127+
# N.B: We run the version in the current checkout instead of
128+
# the one in the version we are releasing, in case we needed
129+
# to fix the script.
130+
self.run_in_virtualenv(
131+
'%s %s' %
132+
(os.path.abspath('misc/download-mypyc-wheels.py'), self.version))
128133

129134
def upload_wheels(self) -> None:
130135
self.heading('Uploading wheels')

0 commit comments

Comments
 (0)