Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

No .mo files bundled in .deb #82

Closed
yktoo opened this issue Jul 23, 2019 · 4 comments
Closed

No .mo files bundled in .deb #82

yktoo opened this issue Jul 23, 2019 · 4 comments
Labels

Comments

@yktoo
Copy link
Owner

yktoo commented Jul 23, 2019

So no localisation is installed.

From build log:

[...]
dpkg-buildpackage
-----------------

dpkg-buildpackage: info: source package indicator-sound-switcher
dpkg-buildpackage: info: source version 2.2.2-1
dpkg-buildpackage: info: source distribution disco
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
 fakeroot debian/rules clean
dh clean --with python3 --buildsystem=pybuild
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_clean
I: pybuild base:217: python3.7 setup.py clean 
running clean
removing '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.7/build' (and everything under it)
'build/bdist.linux-amd64' does not exist -- can't clean it
'build/scripts-3.7' does not exist -- can't clean it
rm -rf locale/
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules build
dh build --with python3 --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:217: python3.7 setup.py config 
WARNING: Directory /<<PKGBUILDDIR>>/locale doesn't exist, no locale files will be included.
running config
   dh_auto_build -O--buildsystem=pybuild
I: pybuild base:217: /usr/bin/python3 setup.py build 
WARNING: Directory /<<PKGBUILDDIR>>/locale doesn't exist, no locale files will be included.
running build
running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7/build/indicator_sound_switcher
[...]
@yktoo yktoo added the i18n label Jul 23, 2019
@yktoo
Copy link
Owner Author

yktoo commented Jul 23, 2019

@paravoid I suspect #76 has broken the i18n support, there's no /usr/share/locale/ dir in the .deb anymore. Any idea why?

@paravoid
Copy link
Contributor

I'm trying this on my buster system and I cannot reproduce it, even after multiple consecutive clean/builds.

Looking at the code in setup.py, it seems like it does create the "locale" (locale_dir) directory, as long as os.path.isdir(PO_DIR) matches, i.e. as long as there is a po/ directory. I'm out of ideas on why that would not be the case here :/

@leobasilio
Copy link
Contributor

Commit a688553 did it. The build directory is created by the extraction of the .tar file, which does include the locale directory, but the clean step removes it. I guess the build system expects a po directory, so that the files are compiled on build time. That means adding the po directory to .tar file. Since the build_package script always generate a fresh tarball, I think this commit could be reverted.

@yktoo
Copy link
Owner Author

yktoo commented May 25, 2020

Resolved in v2.3.2.

I'm still not quite sure what caused this but inspecting the source package showed there were no .po files packaged, which the setup script fairly pointed out. I've sorted that by explicitly including *.po and excluding *.mo in MAINFEST.in.

@yktoo yktoo closed this as completed May 25, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants