-
-
Notifications
You must be signed in to change notification settings - Fork 559
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
Remove the hardcoding of python version in setup.py and SConstruct to build sage_clib and sage itself #11376
Comments
Attachment: trac_11376-build-sage_clib.patch.gz Remove the python version hardcoding in SConstruct, remove debian cruft as well. |
comment:1
I also remove the Debian cruft from SConstruct and setup.py at the same time. |
Author: François Bissey |
comment:4
patch attachment: trac_11376-build-sage_clib.patch failed to apply
|
comment:5
Thanks for looking at this Mariah. It doesn't apply because it was based on 4.7.1.alpha1. It was based on 4.7.1.alpha1 because of #11167 I cannot produce a patch that will work equally on 4.7.rc and 4.7.1.alpha. That's unfortunate but such is life. In fact I may have to rebase attachment: trac_11376-build_setuppy.patch because of #11373 in 4.7.1.alpha2. |
a version of this patch that works with 4.7.rc4 |
comment:6
Attachment: trac_11376-build-sage_clib-4.7.patch.gz Just in case you still want to test it against 4.7.rc4 use this patch attachment: trac_11376-build-sage_clib-4.7.patch instead. |
comment:7
Replying to @kiwifb:
Apologies for the noise. I did not realize that 4.7.1.alpha1 was out. I have not seen any announcement of 4.7.1-alpha1 on sage-release. Is there someplace I should be looking for such announcements? |
comment:8
Replying to @sagetrac-mariah:
No apologies required. It isn't officially out but Jeroen has "prototypes" alpha0, alpha1 and alpha2 already on http://sage.math.washington.edu/home/release/. |
comment:9
I will add that it is perfectly acceptable to me if you want to leave this ticket for now and come back to it once a 4.7.1.alpha is released. |
comment:10
Now that 4.7.1.alpha0 is released this ticket should be in a reviewable state. |
Attachment: trac_11376-build_setuppy.patch.gz Make setup.py python version smart, remove debian cruft. (made dependent on #11373) |
This comment has been minimized.
This comment has been minimized.
comment:11
Decided to avoid problem with #11373 so make it depend on it. |
comment:12
The python documentation for sys.version says "Do not extract version information out of it, rather, use version_info and the functions provided by the platform module." It looks to me as though you could use
or
I'll take a look at the rest of the patches... |
comment:13
Replying to @jhpalmieri:
OK I will rewrite that then. It was purely a case of stealing code from somewhere else. Looks cool in misc/cython.py that will be useful here. I should bring cython.py in line too. |
comment:14
By the way, I should have provided a link: see http://docs.python.org/library/sys.html#sys.version for information about sys.version, and pointers to the other options. |
comment:15
New version of patches all using the platform module. I also included sage/misc/cython.py to switch it from sys to platform. The cython patch in #9958 will be updated consequently. |
This comment has been minimized.
This comment has been minimized.
comment:16
Can there ever be version numbers like '2.10'? Choosing the first three characters of the version string seems riskier than removing everything starting from the second dot. |
comment:22
On skynet/eno (x86_64-Linux-core2-fc), I applied the three patches to sage-4.7.1.alpha2, did 'sage -b', then 'make testlong'. I got the following failure:
|
comment:23
Hi Mariah, I fixed this test as part of #9958 in https://github.com/sagemath/sage/files/ticket9958/trac_9958-fix-misc_cythonpy.patch.gz I thought it was appearing because of python-2.7. If it shows up for you with python-2.6 it is strange that it didn't before the patch. In any case if it shows up for you the above patch will have to be split and moved to this ticket. Just a few minutes. |
Attachment: trac_11376-fix_cythonpy_doctest.patch.gz fix the cython.py doctest for the appearance on numpy |
comment:24
OK new patch added. |
This comment has been minimized.
This comment has been minimized.
comment:25
What about the /local//include/ and /local//lib/ in the returned results? Could this also cause a failure? I'm seeing this also in failure of the cython.py test when the patches of #9958 are applied. And the numpy fix is already in those patches. |
comment:26
On skynet/eno (x86_64-Linux-core2-fc), I applied all four patches to sage-4.7.1.alpha1, did 'sage -b', but I still get the error
|
Attachment: trac_11376-msic_cythonpy-p2.patch.gz Patch to misc/cython.py with the right number of slashes |
This comment has been minimized.
This comment has been minimized.
comment:27
Thanks for pointing it out Steve I had missed it completely. We should have a uniform definition of SAGE_LOCAL, sometimes it has a final "/" and sometimes it doesn't. So I updated the misc_cythonpy patch to -p2. Hope we got everything now. |
comment:28
Applied all patches to sage-4.7.1.alpha2, did 'sage -b', and 'make testlong'. All tests passed. Positive review! (finally!) |
Reviewer: Mariah Lenox |
comment:30
A little word of thanks, in the right bug this time (note to self don't do this again at 1:30am): Thank you Mariah for the review. Thank you John for the suggestion to make it better. Thank you Steve for pointing the obvious. Thank you all for making this reach this stage. Hopefully this will be in 4.7.2.alpha0. |
Merged: sage-4.7.2.alpha0 |
Currently to build sage (the spkg) four files are involved in major way:
The last three to build the sage python extensions. setup.py, and SConstruct both have the version of python used hardcoded in them, module_list.py doesn't refer to the python version anywhere. cython.py mention the python version explicitly in doctest but smartly find the version used for building all by itself.
In this ticket I bring this smartness to SConstruct and setup.py. The advantage of doing this is that sage then can be build with either python-2.6 or 2.7 (and 3.x in the future) without patching. Of course it may still require patches to fix doctest and syntax in some parts - but you would be able to build sage in the first place without having to patch the build system. It has been found to be an impediment to testing in #9958.
Depend: #11373
Apply:
Depends on #11373
CC: @strogdon @nexttime
Component: build
Author: François Bissey
Reviewer: Mariah Lenox
Merged: sage-4.7.2.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/11376
The text was updated successfully, but these errors were encountered: