Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #13637
| Path | csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!bofh.it!news.nic.it!robomod |
|---|---|
| From | Timo Röhling <roehling@debian.org> |
| Newsgroups | linux.debian.maint.python |
| Subject | Re: packaging help request: paths for build_py and build_scripts phases |
| Date | Mon, 18 Oct 2021 18:20:03 +0200 |
| Message-ID | <D9DwL-4QN-19@gated-at.bofh.it> (permalink) |
| References | <D9xKF-1cl-5@gated-at.bofh.it> |
| X-Mailbox-Line | From debian-python-request@lists.debian.org Mon Oct 18 16:13:00 2021 |
| Old-Return-Path | <roehling@debian.org> |
| X-Amavis-Spam-Status | No, score=-11.93 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, BODY_8BITS=1.5, DIGITS_LETTERS=1, DKIMWL_WL_HIGH=-0.049, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, PGPSIGNATURE=-5, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001] autolearn=ham autolearn_force=no |
| X-Policyd-Weight | using cached result; rate: -3.5 |
| X-Greylist | delayed 578 seconds by postgrey-1.36 at bendel; Mon, 18 Oct 2021 16:12:47 UTC |
| Mail-Followup-To | debian-python@lists.debian.org |
| Organization | The Debian Project |
| MIME-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="v6x2qaqpdud4m7vo" |
| Content-Disposition | inline |
| X-Mailing-List | <debian-python@lists.debian.org> archive/latest/19433 |
| List-ID | <debian-python.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-python/> |
| List-Archive | https://lists.debian.org/msgid-search/20211018160305.pw7ibdk4kfg6amb2@mail.gaussglocke.de |
| Approved | robomod@news.nic.it |
| Lines | 102 |
| Sender | robomod@news.nic.it |
| X-Original-Date | Mon, 18 Oct 2021 18:03:05 +0200 |
| X-Original-Message-ID | <20211018160305.pw7ibdk4kfg6amb2@mail.gaussglocke.de> |
| X-Original-References | <20211018100412.4tlznklyu24kxh3k@coil> |
| Xref | csiph.com linux.debian.maint.python:13637 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Hi Jonathan,
* Jonathan Dowland <jmtd@debian.org> [2021-10-18 11:04]:
>Here, the scripts are copied to a path *not* rooted in <<PKGBUILDDIR>>.
>So far as I can tell, both phases are normal parts of the
>setuptools/distutils build lifecycle, and I haven't spotted anything
>obviously non-standard about the way that is specified.
>[...]
>A BTS bug requesting the new version with some back-and-forth trying to
>figure this out is
>https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988597
The main issue is the implicit upstream assumption that the tests
are run from the source root dir; I've had a similar problem with
tweepy and my solution was to make sure that the tests find
everything they need in the build folder, i.e. add the following
snippet to d/rules:
export PYBUILD_BEFORE_TEST=cp {dir}/trash-* {dir}/script/bump.py {build_dir}
export PYBUILD_AFTER_TEST=rm {build_dir}/trash-* {build_dir}/bump.py
The second line is needed so the extraneous stuff is not installed
with the built package. It's not very pretty, and hopefully someone
else has a better solution, but it gets the job done.
You'll also have to patch tests/run_command.py to run python3 and
add python3-psutils to your Build-Depends.
diff --git a/tests/run_command.py b/tests/run_command.py
index 2e31e11..746cdad 100644
--- a/tests/run_command.py
+++ b/tests/run_command.py
@@ -17,7 +17,7 @@ def run_command(cwd, command, args=None, input='', env=None):
if args == None:
args = []
command_full_path = os.path.join(base_dir, command)
- process = subprocess.Popen(["python", command_full_path] + args,
+ process = subprocess.Popen(["python3", command_full_path] + args,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Cheers
Timo
PS. I worked around the missing fork
PPS. I thought about patching run_command.py to use the scripts from
the source directory, but that will use the trashcli module from the
source tree, not from the build tree, and contaminate the source tree
with __pycache__ folders.
--
⢀⣴⠾⠻⢶⣦⠀ ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁ │ Timo Röhling │
⢿⡄⠘⠷⠚⠋⠀ │ 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀ ╰────────────────────────────────────────────────────╯
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread
packaging help request: paths for build_py and build_scripts phases Jonathan Dowland <jmtd@debian.org> - 2021-10-18 12:10 +0200 Re: packaging help request: paths for build_py and build_scripts phases Timo Röhling <roehling@debian.org> - 2021-10-18 18:20 +0200
csiph-web