From owner-freebsd-ports@freebsd.org Sat Nov 24 15:44:28 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38717115202F for ; Sat, 24 Nov 2018 15:44:28 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from tmailer.gwdg.de (tmailer.gwdg.de [134.76.10.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 023FC7DD00 for ; Sat, 24 Nov 2018 15:44:26 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from excmbx-24.um.gwdg.de ([134.76.9.234] helo=email.gwdg.de) by mailer.gwdg.de with esmtp (Exim 4.90_1) (envelope-from ) id 1gQa6a-0003l4-O1 for freebsd-ports@freebsd.org; Sat, 24 Nov 2018 16:44:24 +0100 Received: from krabat.raven.hur (91.8.157.1) by EXCMBX-24.um.gwdg.de (134.76.9.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P521) id 15.1.1591.10; Sat, 24 Nov 2018 16:44:24 +0100 From: Rainer Hurling Subject: SIP configuration seems incomplete for Python3 To: Message-ID: <4be4a0ac-45f0-751f-4315-cd6257c5f635@gwdg.de> Date: Sat, 24 Nov 2018 16:44:23 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Originating-IP: [91.8.157.1] X-ClientProxiedBy: EXCMBX-21.um.gwdg.de (134.76.9.231) To EXCMBX-24.um.gwdg.de (134.76.9.234) X-Virus-Scanned: (clean) by clamav X-Rspamd-Queue-Id: 023FC7DD00 X-Spamd-Result: default: False [-2.08 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.81)[-0.810,0]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:134.76.10.0/23]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[gwdg.de]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.85)[-0.853,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-0.02)[asn: 680(-0.11), country: DE(-0.02)]; NEURAL_SPAM_SHORT(0.12)[0.115,0]; RCVD_IN_DNSWL_MED(-0.20)[23.10.76.134.list.dnswl.org : 127.0.11.2]; MX_GOOD(-0.01)[cached: c1233.mx.srv.dfn.de]; RECEIVED_SPAMHAUS_PBL(0.00)[1.157.8.91.zen.spamhaus.org : 127.0.0.10]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:680, ipnet:134.76.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Nov 2018 15:44:28 -0000 In the preparation of a new port for QGIS 3 (graphics/qgis) I need a functioning sip installation under Python 3.x, to be able to build and use QGIS Python plugins. Unfortunately, the QGIS scripts have problems to find the right sip version and fail. After spending some time, I think it is more a problem with Python 3 SIP than a QGIS one. I have _not_ set DEFAULT_VERSIONS+= python=2.7 python2=2.7 python3=3.6 in /etc/make.conf, so 2.7 should be the default version (I need this for other projects). Installed for Python 3 are the following and other ports: python36-3.6.7 py36-sip-4.19.8_1,1 sipconfig.py for both Python versions can be found under their Python dirs: # locate sipconfig.py /usr/local/lib/python2.7/site-packages/sipconfig.py /usr/local/lib/python2.7/site-packages/sipconfig.pyc /usr/local/lib/python2.7/site-packages/sipconfig.pyo /usr/local/lib/python3.6/site-packages/sipconfig.py Interestingly enough, only sip under Python 2.7 seems to have a compiled version. The sip binaries are found on their expected locations. The one from the default version 2.7 is linked against the unnumbered one: # ls /usr/local/bin/sip* ... /usr/local/bin/sip -> sip-2.7 ... /usr/local/bin/sip-2.7 ... /usr/local/bin/sip-3.6 Now, in Python3, if I test for installed SIP configuration, I get: # python3 Python 3.6.7 (default, Nov 18 2018, 09:23:28) [GCC 4.2.1 Compatible FreeBSD Clang 6.0.1 (tags/RELEASE_601/final 335540)] on freebsd13 Type "help", "copyright", "credits" or "license" for more information. >>> import sipconfig >>> >>> sipcfg = sipconfig.Configuration() >>> print("sip_version:%06.0x" % sipcfg.sip_version) sip_version:041308 >>> print("sip_version_num:%d" % sipcfg.sip_version) sip_version_num:267016 >>> print("sip_version_str:%s" % sipcfg.sip_version_str) sip_version_str:4.19.8 >>> print("sip_bin:%s" % sipcfg.sip_bin) sip_bin:/usr/local/bin/sip-3.6 >>> print("default_sip_dir:%s" % sipcfg.default_sip_dir) default_sip_dir:/usr/local/share/py36-sip ^^^^^^^^^^^^^^^^^^^^^^^^^ >>> print("sip_inc_dir:%s" % sipcfg.sip_inc_dir) sip_inc_dir:/usr/local/include/python3.6m >>> # SIP 4.19.10+ has new sipcfg.sip_module_dir ... if hasattr(sipcfg, "sip_module_dir"): ... print("sip_module_dir:%s" % sipcfg.sip_module_dir) ... else: ... print("sip_module_dir:%s" % sipcfg.sip_mod_dir) ... sip_module_dir:/usr/local/lib/python3.6/site-packages >>> The problem seems to be, that there is no /usr/local/share/py36-sip any more. After the recent changes to PyQt it resides under /usr/loca/share/PyQt5/3.6/sip/ Obviously, there is something wrong with the detection of the right location. Perhaps, the old patch (/usr/local/share/py36-sip) is hardcoded somewhere? Is this a general problem or is there something wrong with my configuration? Any help is really appreciated. Regards, Rainer Hurling