Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Python 2.6 #6

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Python 2.6 #6

wants to merge 21 commits into from

Conversation

jrioux
Copy link
Collaborator

@jrioux jrioux commented Sep 6, 2013

This is based on Jan's upstream master, but I include here one more python 2.6 fix required to fully build lilypond.

jmander and others added 21 commits August 27, 2012 12:25
Comment from Jan:
in target/tools/src/python-2.4.5/setup.py:527 (and below):

        db_setup_debug = False   # verbose debug prints from this script?

Setup.py looks for /usr/include/*db*3,4*/db.h, which is entirely broken:
it should ask GCC if it can find db.h (and/or look at the include
flags); we are cross compiling and it entirely ignores that option.

This holds for all of the extension modules that are checked here.  It
would be nice if we could add %(system_prefix)s for where it looks for
all extensions; on the other hand: trusting GUB's dependencies and
patching Setup.dist is OK too.
This reverts commit aa457a0.

The real fix is teaching setup.py about cross compilation.
This reverts commit 48b18f5.

The real fix is teaching setup.py about cross compilation.
This also removes the need for dbm and crypt fixes (actually, crypt
and nis should not build, as we do not have those libraries in GUB).
Also, rename python-2-6 to python-2.6 and add python-2.4 package.
Fix the compilation of shared python modules, the install
target, and the ImportError on "import hashlib" in python 2.6.
Conflicts:
	gub/specs/python.py
	lilypond.make
@jrioux
Copy link
Collaborator Author

jrioux commented Sep 15, 2013

Upgrading python from 2.4 has been requested for a couple of years (issue 1895). It would rid us of 2.4 problems and ease the transition to a common python2 and python3 codebase. It's obviously affecting the LilyPond build, so @PhilHolmes can you test this branch and see if you can still build LilyPond?

@fedelibre
Copy link

Issue 1895 mentioned above has been marked as duplicate of LilyPond issue 1079.

@fedelibre
Copy link

Today I launched 'make LILYPOND_BRANCH=stable/2.20 lilypond' on Ubuntu 14.04 i686 (running in VirtualBox) and I got this error:

make[1]: Entering directory `/home/dev/gub/target/freebsd-x86/build/lilypond-git.sv.gnu.org--lilypond.git-stable-2.20/python'
PYTHONOPTIMIZE= /home/dev/gub/target/tools/root/usr/bin/python -tt -c 'import py_compile; py_compile.compile ("out/musicexp.py")'
  File "out/musicexp.py", line 1881
    omit = '' if self.visible else '\omit Staff.TimeSignature'
               ^
SyntaxError: invalid syntax

IIUC, it fails because conditional expressions were added in python2.5.

@PhilHolmes Have you ever got these errors?

Here's the traceback:

Traceback (most recent call last):
  File "/home/dev/gub/target/freebsd-x86/build/lilypond-git.sv.gnu.org--lilypond.git-stable-2.20/scripts/build/out/install", line 78, in ?
    shutil.copy2 (f, dest)
  File "/home/dev/gub/target/tools/root/usr/lib/python2.4/shutil.py", line 92, in copy2
    copyfile(src, dst)
  File "/home/dev/gub/target/tools/root/usr/lib/python2.4/shutil.py", line 47, in copyfile
    fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory: './out/musicexp.pyc'
make[1]: *** [local-install-outfiles] Error 1
make[1]: Leaving directory `/home/dev/gub/target/freebsd-x86/build/lilypond-git.sv.gnu.org--lilypond.git-stable-2.20/python'
make: *** [install] Error 2
Command barfed: cd /home/dev/gub/target/freebsd-x86/build/lilypond-git.sv.gnu.org--lilypond.git-stable-2.20 && make  TARGET_PYTHON=/usr/bin/python  DESTDIR=/home/dev/gub/target/freebsd-x86/install/lilypond-2.19.83-root install 

@lemzwerg
Copy link

I suggest to abandon this pull request since we should rather upgrade to 4.7.x. However, it might serve as an aid in the transition.

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

Successfully merging this pull request may close these issues.

5 participants