#48273 closed defect (fixed)
dbus-python: fix include directory for Python34 abiflags
Reported by: | michaelld (Michael Dickens) | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | Cc: | Russell-Jones-OxPhys (Russell Jones), dliessi (Davide Liessi), ericmoret, majoc-at-astro (majoc-at-astro) | |
Port: | dbus-python34 |
Description
Python34 is installed by default with pymalloc enabled, which results in -some- of its libraries and directories names to have 'm' appended to them. See https://www.python.org/dev/peps/pep-3149/#proposal for more info on that flag. Python3.4 provides the config binary flags --abiflags to show this value, which we can use directly in the Portfile, in pre-configure somehow (just in case Python3.4 does not yet exist when the Portfile is initially executed). In this way, we can specify the proper include directory. Python27 does not provide an abiflags variable, but also does not seem to use the 'm' (or any other) appended to any of its names either. I'm not sure how to patch this to make it work; directly changing the variable shows that it does work though. The line in need of change is:
--includedir=${python_prefix}/include/python${python_branch} \
Change History (13)
comment:1 Changed 9 years ago by Russell-Jones-OxPhys (Russell Jones)
Cc: | russell.jones@… added |
---|
comment:2 Changed 9 years ago by Russell-Jones-OxPhys (Russell Jones)
This is preventing py34-pyqt4 from building. I originally asked for the maintainer of that port to be added as cc, then I realised he's the requester!
configure.py: error: '/opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/dbus-1.0' is not a directory
Russell
comment:3 Changed 9 years ago by michaelld (Michael Dickens)
What does the following return for you:
ls -lR /opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4*
comment:4 Changed 9 years ago by Russell-Jones-OxPhys (Russell Jones)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4: total 0 drwxr-xr-x 3 root wheel 102 6 Aug 09:14 dbus-1.0 /opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4/dbus-1.0: total 0 drwxr-xr-x 3 root wheel 102 6 Aug 09:14 dbus /opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4/dbus-1.0/dbus: total 8 -rw-r--r-- 1 root wheel 4010 13 Nov 2014 dbus-python.h /opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m: total 1616 -rw-r--r-- 1 root wheel 19489 26 May 02:49 Python-ast.h -rw-r--r-- 1 root wheel 2856 26 May 02:49 Python.h -rw-r--r-- 1 root wheel 43077 26 May 02:49 abstract.h -rw-r--r-- 1 root wheel 1016 26 May 02:49 accu.h -rw-r--r-- 1 root wheel 1184 26 May 02:49 asdl.h -rw-r--r-- 1 root wheel 477 26 May 02:49 ast.h -rw-r--r-- 1 root wheel 792 26 May 02:49 bitset.h -rw-r--r-- 1 root wheel 264 26 May 02:49 bltinmodule.h -rw-r--r-- 1 root wheel 886 26 May 02:49 boolobject.h -rw-r--r-- 1 root wheel 2114 26 May 02:49 bytearrayobject.h -rw-r--r-- 1 root wheel 2025 26 May 02:49 bytes_methods.h -rw-r--r-- 1 root wheel 4922 26 May 02:49 bytesobject.h -rw-r--r-- 1 root wheel 701 26 May 02:49 cellobject.h -rw-r--r-- 1 root wheel 7194 26 May 02:49 ceval.h -rw-r--r-- 1 root wheel 1666 26 May 02:49 classobject.h -rw-r--r-- 1 root wheel 4227 26 May 02:49 code.h -rw-r--r-- 1 root wheel 6550 26 May 02:49 codecs.h -rw-r--r-- 1 root wheel 2117 26 May 02:49 compile.h -rw-r--r-- 1 root wheel 1954 26 May 02:49 complexobject.h -rw-r--r-- 1 root wheel 8542 26 May 02:49 datetime.h -rw-r--r-- 1 root wheel 2913 26 May 02:49 descrobject.h -rw-r--r-- 1 root wheel 5178 26 May 02:49 dictobject.h -rw-r--r-- 1 root wheel 458 26 May 02:49 dtoa.h -rw-r--r-- 1 root wheel 22469 26 May 02:49 dynamic_annotations.h -rw-r--r-- 1 root wheel 253 26 May 02:49 enumobject.h -rw-r--r-- 1 root wheel 1497 26 May 02:49 errcode.h -rw-r--r-- 1 root wheel 597 26 May 02:49 eval.h -rw-r--r-- 1 root wheel 1862 26 May 02:49 fileobject.h -rw-r--r-- 1 root wheel 1501 26 May 02:49 fileutils.h -rw-r--r-- 1 root wheel 4641 26 May 02:49 floatobject.h -rw-r--r-- 1 root wheel 3558 26 May 02:49 frameobject.h -rw-r--r-- 1 root wheel 3771 26 May 02:49 funcobject.h -rw-r--r-- 1 root wheel 1131 26 May 02:49 genobject.h -rw-r--r-- 1 root wheel 1873 26 May 02:49 graminit.h -rw-r--r-- 1 root wheel 2045 26 May 02:49 grammar.h -rw-r--r-- 1 root wheel 3901 26 May 02:49 import.h -rw-r--r-- 1 root wheel 460 26 May 02:49 intrcheck.h -rw-r--r-- 1 root wheel 567 26 May 02:49 iterobject.h -rw-r--r-- 1 root wheel 2836 26 May 02:49 listobject.h -rw-r--r-- 1 root wheel 3997 26 May 02:49 longintrepr.h -rw-r--r-- 1 root wheel 8174 26 May 02:49 longobject.h -rw-r--r-- 1 root wheel 803 26 May 02:49 marshal.h -rw-r--r-- 1 root wheel 2861 26 May 02:49 memoryobject.h -rw-r--r-- 1 root wheel 253 26 May 02:49 metagrammar.h -rw-r--r-- 1 root wheel 3307 26 May 02:49 methodobject.h -rw-r--r-- 1 root wheel 4897 26 May 02:49 modsupport.h -rw-r--r-- 1 root wheel 1615 26 May 02:49 moduleobject.h -rw-r--r-- 1 root wheel 297 26 May 02:49 namespaceobject.h -rw-r--r-- 1 root wheel 1008 26 May 02:49 node.h -rw-r--r-- 1 root wheel 38521 26 May 02:49 object.h -rw-r--r-- 1 root wheel 13848 26 May 02:49 objimpl.h -rw-r--r-- 1 root wheel 5211 26 May 02:49 opcode.h -rw-r--r-- 1 root wheel 848 26 May 02:49 osdefs.h -rw-r--r-- 1 root wheel 2885 26 May 02:49 parsetok.h -rw-r--r-- 1 root wheel 1128 26 May 02:49 patchlevel.h -rw-r--r-- 1 root wheel 253 26 May 02:49 pgen.h -rw-r--r-- 1 root wheel 1144 26 May 02:49 pgenheaders.h -rw-r--r-- 1 root wheel 4175 26 May 02:49 py_curses.h -rw-r--r-- 1 root wheel 2744 26 May 02:49 pyarena.h -rw-r--r-- 1 root wheel 5944 26 May 02:49 pyatomic.h -rw-r--r-- 1 root wheel 1726 26 May 02:49 pycapsule.h -rw-r--r-- 1 root wheel 43175 26 May 02:49 pyconfig.h -rw-r--r-- 1 root wheel 1320 26 May 02:49 pyctype.h -rw-r--r-- 1 root wheel 1019 26 May 02:49 pydebug.h -rw-r--r-- 1 root wheel 16023 26 May 02:49 pyerrors.h -rw-r--r-- 1 root wheel 2340 26 May 02:49 pyexpat.h -rw-r--r-- 1 root wheel 8489 26 May 02:49 pyfpe.h -rw-r--r-- 1 root wheel 388 26 May 02:49 pygetopt.h -rw-r--r-- 1 root wheel 4274 26 May 02:49 pyhash.h -rw-r--r-- 1 root wheel 2988 26 May 02:49 pymacconfig.h -rw-r--r-- 1 root wheel 2821 26 May 02:49 pymacro.h -rw-r--r-- 1 root wheel 6412 26 May 02:49 pymath.h -rw-r--r-- 1 root wheel 6782 26 May 02:49 pymem.h -rw-r--r-- 1 root wheel 30873 26 May 02:49 pyport.h -rw-r--r-- 1 root wheel 9124 26 May 02:49 pystate.h -rw-r--r-- 1 root wheel 436 26 May 02:49 pystrcmp.h -rw-r--r-- 1 root wheel 1276 26 May 02:49 pystrtod.h -rw-r--r-- 1 root wheel 10184 26 May 02:49 pythonrun.h -rw-r--r-- 1 root wheel 3036 26 May 02:49 pythread.h -rw-r--r-- 1 root wheel 2914 26 May 02:49 pytime.h -rw-r--r-- 1 root wheel 629 26 May 02:49 rangeobject.h -rw-r--r-- 1 root wheel 3301 26 May 02:49 setobject.h -rw-r--r-- 1 root wheel 55599 1 Aug 19:11 sip.h -rw-r--r-- 1 root wheel 1590 26 May 02:49 sliceobject.h -rw-r--r-- 1 root wheel 2068 26 May 02:49 structmember.h -rw-r--r-- 1 root wheel 1353 26 May 02:49 structseq.h -rw-r--r-- 1 root wheel 5099 26 May 02:49 symtable.h -rw-r--r-- 1 root wheel 1355 26 May 02:49 sysmodule.h -rw-r--r-- 1 root wheel 1888 26 May 02:49 token.h -rw-r--r-- 1 root wheel 2201 26 May 02:49 traceback.h -rw-r--r-- 1 root wheel 2444 26 May 02:49 tupleobject.h -rw-r--r-- 1 root wheel 1997 26 May 02:49 typeslots.h -rw-r--r-- 1 root wheel 1057 26 May 02:49 ucnhash.h -rw-r--r-- 1 root wheel 78130 26 May 02:49 unicodeobject.h -rw-r--r-- 1 root wheel 1426 26 May 02:49 warnings.h -rw-r--r-- 1 root wheel 2866 26 May 02:49 weakrefobject.h
comment:5 Changed 9 years ago by michaelld (Michael Dickens)
OK; thanks. Yes, you have this issue too with dbus not installing into the correct directory. Not sure what's to be done. If you are comfortable with Portfiles, then you can edit the one for dbus-python and change the line:
--includedir=${python_prefix}/include/python${python_branch}
to be:
--includedir=${python_prefix}/include/python${python_branch}m
then uninstall & reinstall dbus-python. Eventually a fix will come up.
comment:9 Changed 9 years ago by michaelld (Michael Dickens)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Should be fixed in r140992.
comment:10 Changed 9 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Calling pythonXY-config (as in r140992) is the best way to find the abiflags, but it seems to cause problems
since there is no guarantee pythonXY-config is installed at that point (#49180).
Until a better solution is found, assume for the time being that the abiflag is blank for python <= 3.0 and "m" for python > 3.0 (r141026).
comment:11 Changed 9 years ago by dliessi (Davide Liessi)
Maybe I'm making it too simple, but why don't you test for existence of pythonXY-config and call it only if it exists?
That way, when only processing the Portfile to make PortIndex, retrieve information or check dependencies, abiflag
would sometimes have the wrong value, but the Portfile would execute without errors.
If I understand correctly, abiflag
needs to be set to the correct value only when actually installing/upgrading the port, and at that point Python would have already been installed and pythonXY-config would exist.
comment:12 Changed 9 years ago by michaelld (Michael Dickens)
I like this last suggestion & will try it shortly.
Cc Me!