-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: release aws-requests-auth as a wheel #54
Comments
Thanks for the detailed writeup @kgaughan .
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the version of aws-requests-auth published on PyPI is a source tarball, but this poses issues if you're building a lambda that has binary dependencies, such as, say PyYAML or the cryptography library.
To give you an example, say you do your development of a Mac or Windows box: you might install all your libraries into a directory to be zipped up like so:
The use of
--only-binary :all:
is unfortunately required if you're also using--platform
to guarantee that any binary dependencies downloaded are for the correct target platform. Unfortunately, this means that pip won't bother downloading source tarballs if that's all that's available. Instead, you get an error like the following:The likes of requests, boto3, &c., don't have this particular issue because they're packaged as wheels.
The additional flags are unavoidable, unfortunately, and there seems to be no way to tell pip that source distributions are OK as a fallback.
The fix is simple enough. Add this to
setup.cfg
:That will mean the wheel will work with both Python 2 and Python 3 and indicates that the wheel will also work on any platform. Also, in
setup.py
, replacefrom distutils.core import setup
withfrom setuptools import setup
. This also fixes a bug as distutils doesn't actually support theinstall_requires
distribution option, so it means the dependency on requests will now work properly.Finally, rather than just doing
python3 setup.py sdist bdist_wheel
, ensure thewheel
package is installed and dopython3 setup.py sdist bdist_wheel
instead.You should end up with something like this:
The text was updated successfully, but these errors were encountered: