-
Notifications
You must be signed in to change notification settings - Fork 7
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
setuptools-gettext is not run by python -m build
#94
Comments
The best I've managed to come up with so far that seems to work is to do the following:
The first step causes the The reason I rename I guess that if I did want the This still seems a bit hacky, though! |
On Sat, Dec 14, 2024 at 07:21:26AM -0800, Reuben Thomas wrote:
This package looks like exactly what I need, but I can't work out how to use it!
I read the [issue](#13) about support, or lack of it, for pybuild, i.e. `python -m build`, but I couldn't work out what I was supposed to do to work around it.
I have checked out the repo, and looked at the example project.
When I run `python setup.py`, the `build_mo` stage is run; great!
When I run `python -m build`, the `build_mo` stage is not run.
What about "pip3 install ." ? That seems to run build_mo for me.
I think that if "python -m build" doesn't work, that's simply a bug rather than a documentation issue.
Jelmer
|
python -m build
Thanks @jelmer, I have retitled the issue. |
I'm a bit puzzled how this is meant to work though - we register hooks with setuptools so this should work for all ways in which setuptools gets invoked. There are other setuptools extensions that do work so I'll have a look at those and see if they do anything special. For example, setuptools_rust. |
@jelmer, good point! I also use argparse-manpage, and it seems to work there. |
So it looks like argparse-manpage actually modifies the standard |
This seems lacking interface in setuptools, see pypa/build#729 (it also links one approach to address this). PS: See also pypa/setuptools#2591. |
Ah, thanks for the links. |
This package looks like exactly what I need, but I can't work out how to use it!
I read the issue about support, or lack of it, for pybuild, i.e.
python -m build
, but I couldn't work out what I was supposed to do to work around it.I have checked out the repo, and looked at the example project.
When I run
python setup.py
, thebuild_mo
stage is run; great!When I run
python -m build
, thebuild_mo
stage is not run.So so far, my understanding is that I'll need to run
python setup.py
rather thanpython -m build
, (which is a shame as the former tells me it's deprecated when I run it).The next thing I can't work out is how the
.mo
files are added to a dist package. I tried runningpython setup.py
followed bypython -m build
in the hope that, having built the files, they would now get packaged, but no luck!I appreciate your effort in trying to improve the state of affairs for packaging with gettext, and I also appreciate that Python packaging is not in a great state for stuff that is standard for GNU-style packages but not for Python—I've had similar frustration with packaging manpages, where despite strenuous efforts by the author, I cannot persuade argparse-manpage to work without a
setup.py
either.So in sum, what I'm after is a recipe that will let me use
setuptools-gettext
with pybuild, or if that's not possible, a summary of what the options are.The text was updated successfully, but these errors were encountered: