From nobody Wed Sep 29 00:44:49 2021 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4F17017C9BD3; Wed, 29 Sep 2021 00:44:55 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HJyMC1XpLz3Qrx; Wed, 29 Sep 2021 00:44:55 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pj1-x1032.google.com with SMTP id lb1-20020a17090b4a4100b001993f863df2so486401pjb.5; Tue, 28 Sep 2021 17:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:reply-to:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=IOiWsqTFXafaTuBo4MkgpKtQhTY9AIt7cSdZz5c8W/Y=; b=bO5vH5py7sz8BBKVMxIEtE+jTTioWW01iw/D07R0SI8IbDRaH+ZCGgygqVSPeeltZv KA6BvnIBcrUQWuB3b6wnZAJRhNn8/m1QTIOu/OgCCzmZrfIcJL3INGQtU0AcENXyCvTw Foch/noXhtfadilorp8rgu0ZBu7glvW2EBC+MFnwQWTcyv8r8VKmhRAlnDkvPEirwt6q u+4eDmzMZjAPc+1zOUuG5nrQmuYlUPp0QxSd18+h/sqdNwyW1sLtuo005SOwGBIRmCyz DuQymHMUSg0OCtB0nFixuZcmcjSexRiUmUJ5bip+6BAG/NB9PlxRBnENDSi4EMbi1S7J pO5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :reply-to:subject:content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=IOiWsqTFXafaTuBo4MkgpKtQhTY9AIt7cSdZz5c8W/Y=; b=4nItuysRraPhGD4A0fv7GcqCR+VNeXgy44FKKj7CUORccxc77+b696udrM6xYL8QVS b/JF0+L8HyPWQnNYzMg8bKznwLjrLtCqSxt3h033n/H69mmKa1zfpX3gZ5pazSWL7FHK Swfn02zBT2UVxS/jWLA1GLtG0ZJKivR6pDbTgrK6hp2Om2rc66ZDMUOFjFHaNaP3RINJ 4sgPuwJecUWwPbYLeFIJGZ2Ey2wQsU0slSxGBgC+tOxiEuOZDUYD62y7D480QHpcpDRS XeDvVclAGM9ObKBnNTgNxwWkWI0B9AWnwEwQuDnd02yw8Uqqv/QocjqNEzHmE79lAdMY FARQ== X-Gm-Message-State: AOAM532sRsjW04cbw81zahNwfy9DhcBy56Iqh6EFAWnPEl9eBoTyrjkF H1T+fZbHV3MqgLFblEPsGdh3LV0QKWpF5Q== X-Google-Smtp-Source: ABdhPJwWOuLNvP53t2pocTZ5pnN1XviheQWL7JXnOAt0Fl30x2Z+GxqetCKAMJvA3MuTkh4K4ZlFyQ== X-Received: by 2002:a17:902:e552:b0:13e:249d:1205 with SMTP id n18-20020a170902e55200b0013e249d1205mr7569930plf.27.1632876294057; Tue, 28 Sep 2021 17:44:54 -0700 (PDT) Received: from ?IPV6:2403:5800:7500:3601:d65:6994:dc75:8c5b? (2403-5800-7500-3601-d65-6994-dc75-8c5b.ip6.aussiebb.net. [2403:5800:7500:3601:d65:6994:dc75:8c5b]) by smtp.gmail.com with ESMTPSA id n9sm178348pjk.3.2021.09.28.17.44.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Sep 2021 17:44:53 -0700 (PDT) Message-ID: <10b71c3a-7978-3caf-b108-e72f0213d86f@FreeBSD.org> Date: Wed, 29 Sep 2021 10:44:49 +1000 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Thunderbird/94.0a1 Reply-To: koobs@FreeBSD.org Subject: Re: pytest ffi failure with a new port Content-Language: en-US To: evgeniy@khramtsov.org, python , "ports@freebsd.org" References: <20210928213848.hyrn5lctvkhwpm7f@vax.khramtsov.org> From: Kubilay Kocak In-Reply-To: <20210928213848.hyrn5lctvkhwpm7f@vax.khramtsov.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4HJyMC1XpLz3Qrx X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 29/09/2021 7:38 am, Evgeniy Khramtsov via FreeBSD-ports wrote: > Hi. > > I am trying to get Wayland backend for x11-wm/qtile running, which > requires three new dependencies: https://codeberg.org/ei/ports/commits/branch/qtile > > I want to use tests/ in ports (i.e. x11/py-xkbcommon), so I added: > > +do-test: > + @cd ${WRKSRC}/tests && ${PYTHON_CMD} -m pytest -v -rs > + > > to the Makefile, but make test results in: > > ==================================== test session starts ==================================== > platform freebsd14 -- Python 3.8.12, pytest-4.6.11, py-1.9.0, pluggy-0.13.1 -- /usr/local/bin/python3.8 > cachedir: .pytest_cache > rootdir: /usr/local/poudriere/ports/main/x11/py-xkbcommon/work-py38/xkbcommon-0.4 > collected 0 items / 1 errors > > ========================================== ERRORS =========================================== > ____________________________ ERROR collecting tests/test_xkb.py _____________________________ > ImportError while importing test module '/usr/local/poudriere/ports/main/x11/py-xkbcommon/work-py38/xkbcommon-0.4/tests/test_xkb.py'. > Hint: make sure your test modules/packages have valid Python names. > Traceback: > test_xkb.py:6: in > from xkbcommon import xkb > ../xkbcommon/xkb.py:5: in > from xkbcommon._ffi import ffi, lib > E ModuleNotFoundError: No module named 'xkbcommon._ffi' > !!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!! > ================================== 1 error in 0.16 seconds ================================== > *** Error code 2 > > I rg'ed the ports tree for various ways around this, but nothing worked, > including PYTHONPATH, etc. > > I have no idea why it can't find 'xkbcommon._ffi'. This port links to > libxkbcommon, and the default x11-wm/qtile desktop with Wayland backend > *seems* to be working. The same happens for other two ports (*._ffi not > found). > > Any idea what can be done with do-test? > Hi Evgeniy, try cd $WRKSRC && adding "tests/" to the end of the pytest invocation Try also without tests/ at the end (pytest does autodiscovery) Sometimes one needs to also do some PYTHONPATH environment mangling. Jump on #freebsd-python on Libera IRC, and we can help you get it done ./koobs