Opened 15 years ago

Closed 10 years ago

#23122 closed defect (wontfix)

python26 puredarwin variant

Reported by: probono@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: puredarwin Cc: afb@…, aladin@…, cooljeanius (Eric Gallager)
Port: python26

Description

python26 fails to compile on a PureDarwin 9 system:

In file included from Python/mactoolboxglue.c:27:
Include/pymactoolbox.h:10:27: error: Carbon/Carbon.h: No such file or directory
Include/pymactoolbox.h:13:33: error: QuickTime/QuickTime.h: No such file or directory

A puredarwin variant is needed, like with python25 and python24

Attachments (1)

python26-puredarwin.diff (1.5 KB) - added by afb@… 15 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 15 years ago by probono@…

Cc: probono@… added

Cc Me!

comment:2 Changed 15 years ago by jmroot (Joshua Root)

Cc: mcalhoun@… added; probono@… removed
Keywords: variant removed
Owner: changed from macports-tickets@… to blb@…

You need to cc the maintainers and don't need to cc the reporter.

comment:3 Changed 15 years ago by blb@…

If someone can provide patches, that would be most helpful, since most of us aren't using PureDarwin, hence can't test.

comment:4 Changed 15 years ago by afb@…

Something like this, merged from python25. (also copy files/patch-Modules-posixmodule.c.diff)

It is no longer possible to test these on Mac OS X, since the 1.8.0 version of MacPorts (#12563)

Warning: Implicit variants should not be explicitly set or unset. puredarwin will be ignored.
Warning: Implicit variants should not be explicitly set or unset. macosx will be ignored.

But something like this, anyway... Please test on PureDarwin 9, I can test on Darwin 8 if needed.

comment:5 Changed 15 years ago by probono@…

Thanks afb for the patch, this almost works on PureDarwin 9 but then gives an error late in the process:

running install_egg_info
Writing //opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/lib/python2.6/lib-dynload/Python-2.6.4-py2.6.egg-info
if test -f /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin/python -o -h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin/python; \
	then rm -f /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin/python; \
	else true; \
	fi
(cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin; ln python2.6 python)
rm -f /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin/python-config
(cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin; ln -s python2.6-config python-config)
/usr/bin/install -c -m 644 ./Misc/python.man \
		/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/share/man/man1/python.1
make: Nothing to be done for `maninstall'.
DEBUG: Executing proc-post-org.macports.destroot-destroot-0
xinstall: mkdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/etc/select
xinstall: mkdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/etc/select/python
xinstall: /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/python26/files/python26 -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/etc/select/pyth
DEBUG: Executing proc-post-org.macports.destroot-destroot-1
DEBUG: delete: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin/idle
DEBUG: delete: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin/pydoc
DEBUG: delete: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin/python
DEBUG: delete: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin/python-config
DEBUG: delete: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/bin/pythonw
Error: Target org.macports.destroot returned: no such file or directory
DEBUG: Backtrace: no such file or directory
    while executing
"$post $targetname"
Warning: the following items did not execute (for python26): org.macports.activate org.macports.destroot org.macports.archive org.macports.install
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

comment:6 Changed 15 years ago by afb@…

OK, so just remove "pythonw" from the list. It's only used on Windows and Mac OS X anyway (for GUI).

Changed 15 years ago by afb@…

Attachment: python26-puredarwin.diff added

comment:7 Changed 15 years ago by aladin@…

Cc: aladin@… added

Cc Me!

comment:8 Changed 15 years ago by probono@…

Thanks afb. I was able to successfully compile python26 on PureDarwin 9 using your patch and by removing all mentions of pythonw. Is there a way to populate /opt/local/Library/Frameworks/Python.framework/Versions/2.6? (just deleting "--disable-framework" doesn't seem to do the trick)

comment:9 Changed 15 years ago by afb@…

Probably there is, but last time I looked (circa python25) enabling framework also turned on various Mac features assuming Mac OS X so it was "easier" to just do a plain Unix build for Darwin.

comment:10 Changed 15 years ago by afb@…

http://svn.python.org/view/python/branches/release26-maint/Mac/README?view=markup says:

  1. Why would I want a framework Python instead of a normal static Python? --------------------------------------------------------------------------

The main reason is because you want to create GUI programs in Python. With the exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run from a fullblown MacOSX application (a ".app" bundle).

Can't see that applying on PureDarwin, where all GUI apps are based on X11...

comment:11 Changed 15 years ago by probono@…

Need /opt/local/Library/Frameworks/Python.framework so that subsequently installed Python modules are correctly found, since apparently other portfiles install stuff there, e.g., in the site-packages subdirectory.

A workaround is to manually do some symlinking along those lines:

mkdir -p /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib
ln -s /opt/local//include/python2.6 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Headers
mkdir -p /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/
ln -s /opt/local/bin/python2.6 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/
ln -s /opt/local/lib/python2.6/site-packages /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/

comment:12 Changed 14 years ago by blb@…

Cc: mcalhoun@… removed
Owner: changed from blb@… to mcalhoun@…

comment:13 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:14 Changed 10 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: wontfix
Status: newclosed

With fading support for Python 2.6 (Retiring Python 2.4 and 2.5) and the age of this ticket, it seems unlikely it will ever be fixed.

Note: See TracTickets for help on using tickets.