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
build_mo not run during package installation #13
Comments
I tried apport with the 0.1.4-1 Debian package and it still does not call the |
Hmm, that's odd - it works for me with your branch:
do you perhaps have another copy masking the debian package? |
|
Using Ubuntu 23.10 (mantic) building with pybuild does not work:
|
Odd, that works for me too on unstable:
one thing that might help is to explicitly call "import setuptools_gettext" in setup.py, rather than relying on the setuptools.finalize_distribution_options entry point registration. |
I fail to reproduce your result in a unstable schroot, but at least with some debug output added, it looks like setuptools-gettext is loaded:
|
hmm, is the check for "po" existing failing for some reason perhaps? |
I see that |
hmm, that's odd. one thing that is different is that we're registering the build command in setuptools and the install/clean commands in distutils (which setuptools wraps). Perhaps that makes a difference? |
|
I checked this theory and voilà: Importing |
hah, great - thanks for confirming. Can you send a PR? |
After reading more of the source code and documentation, it looks more like a bug in setuptools or python-build (which should be fixed there). |
Ah, I see. Might be still be useful to change setuptools_gettext as a workaround? Either way, if you end up filing a bug with setuptools or python-build, please do post a link here. |
I found Support for custom build steps and Add 'setuptools.sub_command' entry-points (which is not yet merged). So until setuptools officially supports adding build steps, setuptools_gettext should go back to tweak |
setuptools-gettext doesn't use setuptools.sub_command entry points yet though (see pyproject.toml), so that second PR isn't relevant here. |
And actually, this is what happens for me when overriding distutils.command.build:
|
I created pypa/setuptools#4040 for it. Let's see if upstream agrees or suggest a different way to implement it. |
Result of the setuptools upstream bug: distutils-extra is breaking it. |
Having distutils-extra installed will break running the `build_mo` step, because distutils-extra will override the `build` command after `setuptools_gettext` was imported. See pypa/setuptools#4040 Fixes breezy-team#13
I tried to use setuptools-gettext for apport. The current draft for using setuptools-gettext can be found in https://code.launchpad.net/~bdrung/apport/+git/apport/+ref/setuptools
Running
python3 setup.py build_mo
works in this draft, but the .mo file are not created when building the Ubuntu package withDEB_BUILD_OPTIONS=nocheck debuild -b
. debuild callspython3 setup.py install --root debian/tmp
. The Debian breezy package has a similarsetup.py
call and there the .mo files are built. I compared the draft for apport with the breezy package and found no difference that could explain the different behaviour.The text was updated successfully, but these errors were encountered: