Path: csiph.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!bofh.it!news.nic.it!robomod From: Stefano Rivera Newsgroups: linux.debian.maint.python Subject: Re: .egg-info for entry points during dh_auto_test Date: Fri, 22 Oct 2021 05:50:01 +0200 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Fri Oct 22 03:44:31 2021 Old-Return-Path: X-Amavis-Spam-Status: No, score=-6.9 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIMWL_WL_HIGH=-0.049, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 Mail-Followup-To: Michael Fladischer , debian-python@lists.debian.org X-Gpg-Public-Key: http://www.rivera.za.net/stefano.gpg MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: NeoMutt/20201127 X-Mailing-List: archive/latest/19444 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20211022034414.2bmtenuabf2qv2hw@satie.tumbleweed.org.za Approved: robomod@news.nic.it Lines: 26 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org X-Original-Date: Fri, 22 Oct 2021 03:44:14 +0000 X-Original-Message-ID: <20211022034414.2bmtenuabf2qv2hw@satie.tumbleweed.org.za> X-Original-References: <33f3616e-50d7-93d4-4b21-ae818a6dec6f@fladi.at> Xref: csiph.com linux.debian.maint.python:13648 Hi Michael (2021.10.21_18:55:51_+0000) > pytest-lazy-fixtures is a pytest plugin and registers itself through the > Python entrypoints mechanism. In its unitests, it assumes that this > registration has already happened but during dh_auto_test there is no > .egg-info directory available. I could use "python3 setup.py develop -x" to > generate it, but this registers the package in /usr inside the build chroot > which I think is not the best solution. I looked at this recently for pytest-doctestplus. The lazy answer is to run the full test suite in an autopkgtest, not at build time. pytest also has a mechanism to register plugins through an environment variable, but I couldn't figure out how to get the test suite to work with that. If you do find a nice mechanism, we should probably apply it to the packaging of all pytest plugins. SR -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272