-
-
Notifications
You must be signed in to change notification settings - Fork 516
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
back up/restore conftest.py #39363
base: develop
Are you sure you want to change the base?
back up/restore conftest.py #39363
Conversation
as autoconf's generated configure clobbers conftest*, we are saving conftest.py from it by making a backup copy and then restoring it after the real configure was run.
@vbraun - please have a look whether this doesn't break anything in your machinery |
@orlitzky - can you have a look? |
CI is failing in building docker images with
No idea what wrapper this is. @kwankyu - do you know? |
I may not be understanding this correctly, but isn't it just referring to the file, newly created by this PR, called "configure_wrapper"? |
Perhaps I've broken |
No idea either.
If something is broken, the standard way is to fix it (after understanding how it went broken), not to remove it. |
Creating configure scripts using Anyhow, my latest attempt shows that it's not the issue. The issue is that the docker does not find https://github.com/sagemath/sage/actions/runs/12916470243/job/36020720010?pr=39363#step:13:517 |
I saw your post on the autoconf list and had been planning to try this. It's worse than you say:
|
|
Are we in one of these situations when our docker-based CI won't work until this PR is merged in |
I have no idea what you are asking... What is "these situations"? I was not following the present issue and have no background understanding. |
By the way, I do not object to changing "make configure" with "./bootstrap" for now if it helps. But removing the existing feature "make configure" as you seem to advocate is another matter. |
basically, running ./configure removes all the files matching to preserve our workflow, we rename configure to real_configure and install |
Probably #39373 , let's see. |
Documentation preview for this PR (built with commit f6d72ba; changes) is ready! 🎉 |
@user202729 - CI passes (modulo unrelated doctest failures on some platforms). Can you give this a positive review? |
I would not have any objections, either, but it is a publicly advertised way to install Sage — it's in the top-level README.md, for example — and so |
This goes without saying, certainly. The thing is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haven't actually reviewed it carefully, just a few minor changes then should be good
@@ -0,0 +1,4 @@ | |||
#! /bin/sh | |||
cp conftest.py bak_conftest.py | |||
./real_configure $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be safer to change $@
to "$@"
to avoid arguments with spaces being broken up (not sure if it's portable, at least it works in bash)
also does the real_configure
script support running it in a different directory? if yes then it may be a good idea to also support it by changing it to "$(dirname "$0")"/real_configure
docker/Dockerfile
Outdated
@@ -196,7 +196,7 @@ ARG MAKEFLAGS="-j2" | |||
ENV MAKEFLAGS $MAKEFLAGS | |||
ARG SAGE_NUM_THREADS="2" | |||
ENV SAGE_NUM_THREADS $SAGE_NUM_THREADS | |||
RUN make configure | |||
RUN ./bootstrap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does make configure
still work? (if yes maybe leave it alone to be conservative, if not maybe we need to fix it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, make configure
should still work. However, I don't know how, and trying to figure it out gives me a headache. OK, let's revert this change and see.
This reverts commit 48a81bd.
As an alternate approach, can we rename |
Thinking about it, maybe that can be automated with |
everybody is welcome to provide a better fix. I'm a bit tired of pytest now. |
To be fair, naming it something else might lead to some confusion. If this works we might as well merge it in until some other issue comes up. |
For the current approach, the final rename should probably come in a |
In my opinion, the cleanest solution would be to back out the changes that caused the original problem, namely #39206. From the description there, it sounds like I don't know much about |
That's the status-quo. In the future, however, everyone uses pytest (instead of our custom-made doctest runner) and meson (instead of configure + make). We can of course discuss how close we are to this future, but in any case we should work towards this goal and not away from it. So in the current context, fix configure and keep pytest as close to the vanilla pytest experience as possible. (I'm also not sure if the The changes here look good to me, maybe move the wrapper to the build directory if possible. |
pytest had made an unfortunate choice of names for their config files. pytest is increasingly used more and more in Sage and their dependencies. |
@tobiasdiez - did you try creating a directory |
No, I've not tried this idea. The reason why the conftest is in the root now, is because there were a couple of issues with importing the doctests. Roughly speaking, |
@tobiasdiez if I try running pytest on a Sage installation built in the usual way (no meson), all I get is an import error:
Is this a bug? Or I do something wrong? |
This seems to be a genuine error, there is no Looking at https://github.com/search?q=repo%3Asagemath%2Fsage%20all__sagemath_categories&type=code all these |
simply deleting the offending I also tried moving |
this will fix #39357
📝 Checklist
⌛ Dependencies