Skip to content
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

some files in sage-4.4.{0,1} have dos line ending instead of a unix line ending #8898

Closed
kiwifb opened this issue May 5, 2010 · 25 comments
Closed

Comments

@kiwifb
Copy link
Member

kiwifb commented May 5, 2010

Various files in the sage spkg have dos line ending rather than unix ones.

I found about this while trying to build sage with python-2.6.5
which absolutely refused to parse these files as is.
Not sure how to submit a patch for line endings.

Execute from SAGE_ROOT/devel/sage:

  1. attachment: 8898.sh

CC: @fredrik-johansson

Component: misc

Author: Minh Van Nguyen, Jeroen Demeyer

Reviewer: François Bissey

Issue created by migration from https://trac.sagemath.org/ticket/8898

@kiwifb kiwifb added this to the sage-4.6.1 milestone May 5, 2010
@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented May 5, 2010

comment:1

Some files under sage/logic/ also have DOS line ending.

@kiwifb
Copy link
Member Author

kiwifb commented May 5, 2010

comment:2

just checked sage/logic/booleval.py is actually in "mac format" in sage-4.4
I will check sage-4.4.1 later.
But those are pure python files, they may be ok but cython with
python-2.6.5 refused to deal with the other 4.

@aghitza aghitza assigned jasongrout and unassigned aghitza Sep 2, 2010
@aghitza aghitza removed the c: algebra label Sep 2, 2010
@sagetrac-mvngu

This comment has been minimized.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 7, 2010

comment:4

The attached patch converts the following files to use Unix line endings:

  • sage/libs/mpmath/ext_impl.pxd
  • sage/libs/mpmath/ext_main.pyx
  • sage/libs/mpmath/ext_main.pxd
  • sage/libs/mpmath/ext_libmp.pyx
  • sage/logic/booleval.py

I used the Perl script at

http://www.obviously.com/tech_tips/dos2unix.html

to convert to Unix end lines. Fredrik Johansson is a main developer of mpmath. I have CC'd him so he is aware of this Unix line endings issue.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 7, 2010

Author: Minh Van Nguyen

@kiwifb
Copy link
Member Author

kiwifb commented Nov 11, 2010

comment:5

sage/libs/mpmath/ext_impl.pxd at least as been changed since this patch has been posted. It may need rebasing for all 4 files.

@kiwifb
Copy link
Member Author

kiwifb commented Nov 11, 2010

Attachment: trac_8898-unix-endlines.2.patch.gz

update of the patch based on sage-4.6

@kiwifb
Copy link
Member Author

kiwifb commented Nov 11, 2010

comment:6

OK - so I updated the patch (but could not delete the old one, I don't have the
right to do it).

This fairly trivial patch now needs a review.

@cschwan
Copy link
Mannequin

cschwan mannequin commented Nov 11, 2010

comment:7

I have tested the patch with python-2.6.6 and sage-on-gentoo - everything fine here.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Nov 11, 2010

comment:8

Attachment: trac-8898_unix-endlines.patch.gz

Here are some problems with attachment: trac_8898-unix-endlines.2.patch:

  • It fails to apply on Sage 4.6.1.alpha0; I got the following failure:
[mvngu@sage sage-main]$ pwd
/dev/shm/mvngu/sage-4.6.1.alpha0/devel/sage-main
[mvngu@sage sage-main]$ hg qimport https://github.com/sagemath/sage-prod/files/10649029/trac_8898-unix-endlines.2.patch.gz && hg qpush 
adding trac_8898-unix-endlines.2.patch to series file
applying trac_8898-unix-endlines.2.patch
patching file sage/libs/mpmath/ext_main.pyx
Hunk #1 FAILED at 0
1 out of 1 hunks FAILED -- saving rejects to file sage/libs/mpmath/ext_main.pyx.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh trac_8898-unix-endlines.2.patch

My rebased patch should take care of the above issues for Sage 4.6.1.alpha0. See the ticket description for which patch to apply.

@sagetrac-mvngu

This comment has been minimized.

@kiwifb
Copy link
Member Author

kiwifb commented Nov 12, 2010

comment:9

Sorry I missed sage/logic/booleval.py somehow. In any case this one is no bother
and is only included for consistency. It doesn't prevent building the way the other
do and it is usable. I also didn't see there was a change affecting this in 4.6.1.alpha0. I will test it shortly and report.

@kiwifb
Copy link
Member Author

kiwifb commented Nov 12, 2010

comment:10

4.6.1.alpha0 took me for a little ride.
Anyway, Minh's new patch applies cleanly to 4.6.1.alpha0 and it compiles
cleanly with a python-2.6.5 install as expected. sage starts without problems.
For safety I also did a run of sage -t --long in the sage/libs/mpmath/ and
sage/logic/ and everything ran ok.

I am putting this back to positive review, hopefully no one messed up with those
files in alpha1 so it will apply cleanly there as well.

@jdemeyer
Copy link

Script to do the changes (to be executed in SAGE_ROOT/devel/sage)

@jdemeyer
Copy link

comment:11

Attachment: 8898.sh.gz

@jdemeyer
Copy link

comment:12

Any complaints if I execute the script attachment: 8898.sh instead of applying the patch? The script also fixes some more files.

@jdemeyer

This comment has been minimized.

@kiwifb
Copy link
Member Author

kiwifb commented Nov 13, 2010

comment:13

Replying to @jdemeyer:

Any complaints if I execute the script attachment: 8898.sh instead of applying the patch? The script also fixes some more files.

No complaints here. As I initially said my main concern are the cython files.
I'll be happy if a fix goes in script or patch.

@kiwifb
Copy link
Member Author

kiwifb commented Nov 14, 2010

comment:14

I am building 4.6.1.alpha2 which includes the fix. cython parsed everything
without trouble using python-2.6.5 and compilation is now underway.
So it looks good to me.

@jdemeyer
Copy link

comment:15

François, I am interpreting your post as a positive review, okay?

@jdemeyer
Copy link

Reviewer: François Bissey

@jdemeyer
Copy link

Changed author from Minh Van Nguyen to Minh Van Nguyen, Jeroen Demeyer

@kiwifb
Copy link
Member Author

kiwifb commented Nov 14, 2010

comment:16

Replying to @jdemeyer:

François, I am interpreting your post as a positive review, okay?

OK, the build finished successfully, so yes positive review.

@jdemeyer
Copy link

Merged: sage-4.6.1.alpha2

@jdemeyer
Copy link

Changed merged from sage-4.6.1.alpha2 to none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants