Path: csiph.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!bofh.it!news.nic.it!robomod From: Dmitry Shachnev Newsgroups: linux.debian.maint.python Subject: Re: .egg-info for entry points during dh_auto_test Date: Sat, 30 Oct 2021 22:10:01 +0200 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Sat Oct 30 20:04:56 2021 Old-Return-Path: X-Amavis-Spam-Status: No, score=-11.251 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5, PGPSIGNATURE=-5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -5.5 X-Gm-Message-State: AOAM533VT7C1CnQ665qBTEIDARac0LGkTmkeNFkNC7we5erXBoz1zY/0 uGgwy3m9BTW7KGdI6m2EHBeEh/ZBM2A= X-Google-SMTP-Source: ABdhPJzQ/HyikmIr+qC8BkLtNHpbyOQbgCaQMcU/Ga6RvHvKloeJwm7riszjkQabC1FWwwXuqhxIHQ== X-Received: by 2002:a05:6512:3c98:: with SMTP id h24mr17875180lfv.155.1635624281133; Sat, 30 Oct 2021 13:04:41 -0700 (PDT) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HqrBXhasKlzCSE00" Content-Disposition: inline X-Mailing-List: archive/latest/19471 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/YX2lVjTi8LgwBhN6@mitya57.me Approved: robomod@news.nic.it Lines: 62 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org X-Original-Date: Sat, 30 Oct 2021 23:04:38 +0300 X-Original-Message-ID: X-Original-References: <33f3616e-50d7-93d4-4b21-ae818a6dec6f@fladi.at> Xref: csiph.com linux.debian.maint.python:13671 --HqrBXhasKlzCSE00 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Michael! On Thu, Oct 21, 2021 at 08:55:51PM +0200, Michael Fladischer wrote: > Hi, > > I'm working on src:pytest-lazy-fixtures and was trying to get the unittests > to run but it seems that I have run into a problem that I'm not sure on how > to fix it in a clean way. > > 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. > > Is there an other, less intrusive way to register the entrypoint before > running the tests? I am a bit late, but nobody in this thread mentioned debian/pybuild.testfiles. It is a list of files or directories that pybuild will copy to its build directory before running the tests, and delete after running them. If you have *.egg-info in the orig tarball, just add that file (and the tests directory itself) to debian/pybuild.testfiles. If no, also add this line to debian/rules: export PYBUILD_BEFORE_TEST={interpreter} setup.py egg_info Example package where I am doing this is pybtex-docutils. -- Dmitry Shachnev --HqrBXhasKlzCSE00 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE5688gqe4PSusUZcLZkYmW1hrg8sFAmF9pVYACgkQZkYmW1hr g8uzQQ/+Lz/eidLPkA5eig47RtIOxsxeVzuBKQ5yc5bWmIJGDWcvUUTMjUlAeZDQ SF6rXVZzTAfhpYZRdokP9SBWzDTv+nmlln2396Uvkd6Lu5OEF/XRSqDAe5hoB1Nx OGrCILhU8psCwUYWxRhnwHPfI6wkIl3UUaH7VTbVUsc21fjzWW2kIAkIvigzwIYS a3u5omWifIOYADuDbfAXh9sKA9vpo1JXRDFQJAbJwAeF++b/P3QIRWLVPgopg6gD nb7/tEG9lEZfAcCRVmJ4jjZy7uxQQWWgJyY8kh3DwFEQwXiHqmM8Z0tFYzHJSDsO NVqrODz2iyxLgAs2jtC5bScf9Gd7LKo8rK0yiFxL0Lohy9tY3R4nm/CfUTXHduzi poXU1HDfHGizSiZczRff/P50CjylWPld6kTvjb4ZehRd8pjH7f/UG9E6dpMz+PxA 1EacQydzndWU6dLCL1CikN82gm9pbchaFdInJkPmYgHqItmvjU5fmPUSmawzmCLp qR/8X0azNEd/fIVLwX5VbM/W05o+Hy3Sl4XHOQv3Qf1H8/OJcbU0CgTMPNr4mlkp 89AQSA82wcTsuG39Sn74bLye2Rr23HYm5TWs6FeEStPna8wiJEJ31IuVG+3PH+pB vNxsowAKKC4VZ4vI9PDufwWJ6Cft6QlPS5pWdnfazdwA785sTjc= =5Ozp -----END PGP SIGNATURE----- --HqrBXhasKlzCSE00--