From debbugs-submit-bounces@debbugs.gnu.org Mon May 25 18:43:20 2020 Received: (at 41455) by debbugs.gnu.org; 25 May 2020 22:43:20 +0000 Received: from localhost ([127.0.0.1]:42753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdLoW-0001JG-Bx for submit@debbugs.gnu.org; Mon, 25 May 2020 18:43:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdLoV-0001J4-0U for 41455@debbugs.gnu.org; Mon, 25 May 2020 18:43:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59000) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdLoP-0004i5-JN; Mon, 25 May 2020 18:43:13 -0400 Received: from ti0006q161-2604.bb.online.no ([84.202.68.75]:39812 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jdLoO-0004IK-M3; Mon, 25 May 2020 18:43:13 -0400 From: Marius Bakke To: Edouard Klein , 41455@debbugs.gnu.org Subject: Re: [bug#41455] [PATCH 1/2] gnu: Add python-libtmux In-Reply-To: <87y2pgiclc.fsf@alice.lan> References: <87d06wazez.fsf@alice.lan> <87y2pgiclc.fsf@alice.lan> Date: Tue, 26 May 2020 00:43:10 +0200 Message-ID: <87pnar63gh.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41455 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Edouard Klein writes: > * gnu/packages/check.scm (python-pytest-4): New variable. > * gnu/packages/tmux.scm (python-libtmux): New variable. Thanks! Can you submit these as two separate patches? > + (native-inputs > + `(("python-setuptools-scm" ,python-setuptools-scm) > + ("git" ,git))) > + (arguments `(#:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'git-tag > + (lambda _ > + ;; setuptools-scm needs to know the version > + (invoke "git" "init") > + (invoke "git" "add" ".") > + (invoke "git" "config" "user.name" "John Doe") > + (invoke "git" "config" "user.email" "nobody@examp= le.com") > + (invoke "git" "commit" "-m" "dummy commit") > + (invoke "git" "tag" ,version)))))) This is weird, we haven't needed this before. Is there a way to avoid the dependency on git here? In the worst case maybe we can create ".git/refs/tags/,version" manually? :-/ Also, please make this inherit from pytest instead of duplicating all the fields. [...] =20=20 > +(define-public python-libtmux > + (package > + (name "python-libtmux") > + (version "0.8.2") > + (source > + (origin > + (method git-fetch) > + ;; Pypi source tarball does not include tests > + (uri (git-reference > + (url "https://github.com/tmux-python/libtmux.git") > + (commit (string-append "v" version)))) > + (file-name "python-libtmux") > + (sha256 > + (base32 > + "1akjv6aqpc690c4l2cjh0fxbpxxg63sfjggapfjjjaqmcl38g1dz")))) > + (build-system python-build-system) > + (propagated-inputs > + `(("python-pytest-4" ,python-pytest-4) Do you know if pytest 4 is really needed? Often Python packages pin a specific version for no good reason, and one can simply substitute "=3D=3D" with ">=3D" in setup.py and it's all good. > + ("tmux" ,tmux) Even though this is useless without tmux, I'm not sure if we should propagate it. Some users might have custom versions of tmux, but would still want to use this library. WDYT? > + ("procps" ,procps))) ;; Tests need top ^ only one semicolon for margin comments ;typically without a space, like this > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (replace 'check > + (lambda _ > + ;; Extend PYTHONPATH so the built package will be found. > + (setenv "PYTHONPATH" > + (string-append (getcwd) "/build/lib:" > + (getenv "PYTHONPATH"))) > + ;; Skip tests that I suspect fail because of a change > + ;; in behavior in tmux 3 from tmux 2 > + ;; https://github.com/tmux-python/libtmux/issues/281 > + (invoke "pytest" "-vv" "-k" > + (string-append "not test_show_option_unknown " > + "and not test_show_window_option_unk= nown")) > + #t))))) > + (home-page > + "https://github.com/tmux-python/libtmux") This line break is unnecessary. Otherwise looks good. Can you send updated patches? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl7MSf4ACgkQoqBt8qM6 VPopWAf8C5GSdQz00GcRPaO/WqO01W+WXLVmiAh2j//0UTgAq7uZraXOaRc4Im3v eLMzPqBbeyyZ6WJUKFftK+o0Q7DzjKoNRWWECFsjajCTdgRqUWwyIKTJxz4rDsRR BnjSTOFy+/TkSvT+bZnztFNRVR49JSFQhQaP7HTUUj3LKmIopFfNWrkJuYmlJDjB 9pyI+d6S1QShUmIMTlrc3O/B6uO6IEY1LNqCFZXGe8BVcDcQZ6+A42bKVOJk/uYC 5ymB3x17lofMkku4v8ZAc9T/snzzkWeMl0B+T1P7b9fDEetrbxND/k0tq/CW3ifb mewsa9leFldUA+7Ea3p3vusD5flKeA== =LZC0 -----END PGP SIGNATURE----- --=-=-=--