Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Andreas Tille Newsgroups: linux.debian.maint.python Subject: Re: How to enable Python3 for python-freecontact Date: Wed, 04 Jul 2018 09:00:01 +0200 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Jul 4 06:58:03 2018 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) X-Mailing-List: archive/latest/16089 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20180704065746.f3urwzmqcrlfuq6i@an3as.eu Approved: robomod@news.nic.it Lines: 49 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 4 Jul 2018 08:57:46 +0200 X-Original-Message-ID: <20180704065746.f3urwzmqcrlfuq6i@an3as.eu> X-Original-References: <20180703171659.wsztbkyj4w7dfokd@an3as.eu> <20180704022635.GA7795@Asuna> Xref: csiph.com linux.debian.maint.python:10675 Dear Lumin, On Wed, Jul 04, 2018 at 02:26:36AM +0000, Lumin wrote: > I'm not sure whether there is a better way to workaround this, > but the following solution works fine > > > - libraries = ['freecontact', 'boost_python'])] > + libraries = ['freecontact', 'boost_python-py%d%d'%(sys.version_info[0], sys.version_info[1])])] > > > works for all python versions, i.e. 2.7, 3.6, 3.7 . Works perfectly for building the modules. Unfortunately the test does not work for Python3. If I try inside pbuilder chroot: root:/build/python-freecontact-1.1# PYTHONPATH=.pybuild/cpython3_3.6_freecontact/build/ python3.6 test/test01.py Traceback (most recent call last): File "test/test01.py", line 87, in test_main() File "test/test01.py", line 83, in test_main test_support.run_unittest(MyTestCase1 AttributeError: module 'test.test_support' has no attribute 'run_unittest' This also happens if I build without testing and after installing the python3-freecontact package: /python-freecontact(master) $ python3 test/test01.py Traceback (most recent call last): File "test/test01.py", line 87, in test_main() File "test/test01.py", line 83, in test_main test_support.run_unittest(MyTestCase1 AttributeError: module 'test.test_support' has no attribute 'run_unittest' Any clue how to work around this? Kind regards Andreas. -- http://fam-tille.de