-
-
Notifications
You must be signed in to change notification settings - Fork 10
Fixed for Python 3.6 / pip 9.0.1 on Mac OS X 10.13. #16
Conversation
Oh, and great work on this utility by the way. Finding it very handy for uploading packages to AWS lambda. :-) |
Cool to hear that it's helping you out! I'll double check this patch when I'm at a mac later. Thanks for the PR :D Just curious, what commands are you trying / seeing on mac (so I can make sure they work myself!) -- the main intention of this package was for linux platforms but I can definitely see wanting to "rename" a specific mac distribution set. |
No problem. Let me know if you need me to amend the PR. I was doing |
I have a slightly different patch which I think works better? I couldn't get this to work with your patch for instance: pip-custom-platform wheel --platform=macwat simplejson
pip-custom-platform install wheelhouse/*macwat.whl (note that the way that Here's the patch: diff --git a/pip_custom_platform/pymonkey.py b/pip_custom_platform/pymonkey.py
index 3d8e772..facf730 100644
--- a/pip_custom_platform/pymonkey.py
+++ b/pip_custom_platform/pymonkey.py
@@ -11,6 +11,11 @@ def pymonkey_patch(mod, args):
if mod.__name__ == 'distutils.util':
from pip_custom_platform.default_platform import get_platform_func
mod.get_platform = get_platform_func(args, mod.get_platform)
+ elif mod.__name__ in ('pip.pep425tags', 'pip._internal.pep425tags'):
+ from pip_custom_platform.default_platform import get_platform_func
+ mod.get_platform = get_platform_func(args, mod.get_platform)
+ mod.supported_tags = mod.get_supported()
+ mod.supported_tags_noarch = mod.get_supported(noarch=True)
elif mod.__name__ in ('pip', 'pip._internal') and hasattr(mod, 'main'):
from pip_custom_platform._main import get_main
mod.main = get_main(mod.main) try it out and let me know if it works for you! (then either you or I can commit it and I'll merge it in :D) |
Yep, seems to work well! I'm surprised you don't need the |
Added monkey patch for pep425tags modules.
yeah the |
I'll make a release for this when I get the chance! (leaving this unread in my email so it bothers me until I do it 😆 ) |
Okay, guess I didn't check closely enough! Sounds good. Looks forward to the release. :-) |
This has been released as v0.3.2! |
Brilliant, thank you! |
There was some Mac-specific code in pip that was causing issues with the
get_platform
monkey patch.I'm not sure if I added the monkey patch for
sysconfig.get_platform
correctly (this is needed for Python 2.7 and >= 3.2, according to the pip source code, apparently). In any case, it seems to work!