www.fgks.org   »   [go: up one dir, main page]

Skip to content
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

i18n: install web.py and Babel globally #8436

Merged

Conversation

scottbarnes
Copy link
Collaborator
@scottbarnes scottbarnes commented Oct 19, 2023

Closes #8002

Fix

Technical

This adds a few packages globally to the local Docker development environment.

Obviously doubling packages is potentially pointless duplication, though it draws from the same source in requirements.txt and installs as few packages as possible.

This increases the size of site-packages on the development containers from 13 megabytes to 55 megabytes:

❯ docker compose run --rm -uroot home du -ch /usr/local/lib/python3.11/site-packages
...
55M total

Thoughts?

Before:

❯ docker compose run --rm -uroot home pip list                                                                                                                                                                                                                                              
WARN[0000] The "HOST" variable is not set. Defaulting to a blank string.                                                                                                                                                                                                                    
Package    Version                                                                                                                                                                                                                                                                          
---------- -------                                                                                                                                                                                                                                                                          
pip        22.3.1                                                                                                                                                                                                                                                                           
setuptools 65.5.1                                                                                                                                                                                                                                                                           
wheel      0.38.4    

After

❯ docker compose run --rm -uroot home pip list
WARN[0000] The "HOST" variable is not set. Defaulting to a blank string. 
Package          Version
---------------- -------
Babel            2.12.1
cheroot          10.0.0
jaraco.functools 3.9.0
more-itertools   10.1.0
pip              22.3.1
setuptools       65.5.1
web.py           0.62
wheel            0.38.4

That said, it does fix the issue:

❯ docker compose run --rm -uroot home ./scripts/i18n-messages update ja
WARN[0000] The "HOST" variable is not set. Defaulting to a blank string. 
Updating ['ja']
updated /openlibrary/openlibrary/i18n/ja/messages.po
compiled /openlibrary/openlibrary/i18n/ja/messages.po

Testing

docker compose build
docker compose run --rm -uroot home ./scripts/i18n-messages update <language code>

Screenshot

Stakeholders

@cdrini
@cacaoMath

@cdrini cdrini self-assigned this Oct 19, 2023
Copy link
Collaborator
@cdrini cdrini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Not using looks like you already have pretty well :) I wish there was a way to handle this more smoothly, but this seems like a great interim fix!

@cdrini cdrini merged commit 3997696 into internetarchive:master Oct 19, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The "docker compose exec -uroot ..." in i18n's README " doesn't work if the instructions are followed
2 participants