-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix packager.py name normalization #1288
Comments
What platform is this failing on? |
@stealthycoin this is running newly installed Ubuntu 19.10 + standard PyCharm Community installation (on KVM, but that shouldn't matter, I think?). Adding further platform information below -- please let me know if you need any other info.
Thanks! |
Ok i'll take another look. I couldn't repro on a handful of OSes but I didn't try Ubuntu. |
Thanks @stealthycoin. To help with debugging, I'm attaching the PIP file that was generated with the exact command that Chalice executes during packaging:
(I had to GZIP the WHL file for GitHub to allow the attachment.) Note that on this platform SQLAlchemy files end up being in |
@stealthycoin did you have a chance to take a look at it? Thanks. |
@stealthycoin @johnvencky I ran into the same issue on amazonlinux but installing with this patch made it work. |
Trying to track down this issue. Here's the set of steps I tried. Are people still running into this? I'd like to repro this myself, but it seems to work as I expect when I ran on ubuntu. #1356 (comment) |
After deployment we noticed that our application didn't work anymore:
[ERROR] Runtime.ImportModuleError: Unable to import module 'app': No module named 'sqlalchemy'
Our requirements.txt file has the following, so no problem there:
While debugging we noticed that the resulting deployment has sqlalchemy files in the wrong location:
It looks like packager.py does in fact have the code to move purelib back to the root directory -- function _install_purelib_and_platlib -- however, it is not working as intended.
While debugging further with print()s we noticed that wheel.data_dir variable is just wrong:
This yields sqlalchemy-1.3.9.data rather than SQLAlchemy-1.3.9.data and therefore the code in _install_purelib_and_platlib doesn't execute. The reason is the normalization function:
I don't think package names should be forced lower-case like that -- even though in theory they should be lower-case, in practice our requirements.txt does have quite a few upper-cased package names and identifiers:
I am creating a pull request to fix this issue, and after using it our deployment is able to successfully use SQLAlchemy package again.
Thanks!
The text was updated successfully, but these errors were encountered: