-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a tricky situation, because the PyPy wheel is special — it does not contain the C extension. We do not want this being picked up by anything except pypy. Unfortunately, after pip version 19.3.1 (and until at least version 20.1.1), pip will not pick up the `pp3-none-any.whl` tag (see https://github.com/pypa/pip/issues/8347 ), so pypy users with a recent version of pip will get the sdist (which is our only alternative really anyway). We'll ship these wheels anyway, since this seems to be an issue with pip, and this is indeed the proper tag for PyPy 3 wheels.
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 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
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,22 @@ | ||
import pathlib | ||
|
||
|
||
def main(): | ||
(generic_wheel,) = pathlib.Path("dist").glob("*.whl") | ||
|
||
name = generic_wheel.name | ||
old_comp = "-py3-none-any.whl" | ||
if not name.endswith(old_comp): | ||
raise ValueError( | ||
f"Unexpected wheel name, does not end with " + f"{old_comp}: {name}" | ||
) | ||
|
||
new_name = name[: -len(old_comp)] + "-pp3-none-any.whl" | ||
new_wheel = generic_wheel.parent / new_name | ||
|
||
generic_wheel.rename(new_wheel) | ||
print(f"Successfully renamed {generic_wheel} to {new_wheel}") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |