From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mNbCBTxvlV+BZgAA0tVLHw (envelope-from ) for ; Sun, 25 Oct 2020 12:27:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oJyeATxvlV9mNQAAbx9fmQ (envelope-from ) for ; Sun, 25 Oct 2020 12:27:40 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6FFFF9403E8 for ; Sun, 25 Oct 2020 12:27:39 +0000 (UTC) Received: from localhost ([::1]:48738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWf7a-0006l6-Fd for larch@yhetil.org; Sun, 25 Oct 2020 08:27:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWf7N-0006ki-Pi for help-guix@gnu.org; Sun, 25 Oct 2020 08:27:25 -0400 Received: from flashner.co.il ([178.62.234.194]:56648) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWf7L-0005uU-QJ for help-guix@gnu.org; Sun, 25 Oct 2020 08:27:25 -0400 Received: from localhost (unknown [141.226.13.8]) by flashner.co.il (Postfix) with ESMTPSA id 8712C400D1; Sun, 25 Oct 2020 12:27:22 +0000 (UTC) Date: Sun, 25 Oct 2020 14:26:44 +0200 From: Efraim Flashner To: Hamzeh Nasajpour Subject: Re: Packaging a python package that is using setuptools_rust Message-ID: <20201025122644.GA1083@E5400> References: <80e00aa7-9ddb-4255-9d55-0393e97e84e2@www.fastmail.com> <03b51916-f18c-4776-96ac-616b89c7c99b@www.fastmail.com> <87lffu7fax.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline In-Reply-To: X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/25 08:27:23 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: SuarezMiguelC via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -2.61 X-TUID: 151R8wLKvXi5 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 25, 2020 at 02:58:22PM +0330, Hamzeh Nasajpour wrote: > Thanks for your quick reply. >=20 >=20 > > (native-inputs > > `(... > > ("rust:cargo" ,rust "cargo") > > ...)) >=20 > Thanks this step passed, but now I face with another error in dependencie= s.=20 >=20 > ``` > ... > phase `patch-generated-file-shebangs' succeeded after 0.0 seconds > starting phase `build' = = = =20 > running "python setup.py" with command "build" and parameters () > running build > running build_py > creating build > creating build/lib > creating build/lib/etebase > copying etebase/__init__.py -> build/lib/etebase > running build_ext > running build_rust > error: failed to load source for a dependency on `cpython` >=20 > Caused by: > Unable to update registry `https://github.com/rust-lang/crates.io-index` >=20 > Caused by: > failed to create directory `/homeless-shelter/.cargo/registry/index/git= hub.com-1ecc6299db9ec823` >=20 > Caused by: > Permission denied (os error 13) > Traceback (most recent call last): > File "", line 1, in > File "setup.py", line 4, in > ... > ``` >=20 > indeed, this library is python and internally it's using a rust library. = the `cpython` is one its dependencies that I packaged it (`rust-cpython`) a= nd it needs to it. I don't know how can I add rust dependencies here since= I'm using python build system. I added it to inputs but not resolved. >=20 > Indeed now the problem is adding dependencies (some of them rust and some= of them python) to this package while I'm using the python build system. D= o you have any idea? >=20 This one is a little harder. You can add cargo-build-system phases into the python-build-system (see icecat for an example) and add a phase to place the rust dependencies _sources_ in the correct location, or you can switch it over to a cargo-build-system and add back the python-build-system phases (see newsboat for an example). IMO the cargo-build-system option is easier since it takes care of dependency management for you in terms of #:cargo-inputs. >=20 > Regards, > Hamzeh >=20 >=20 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl+VbwEACgkQQarn3Mo9 g1FxVA//Y7IxzuTLkx2Rod5wdMp8S6dS6lNb4f6jdYUez4MHInB6HoGHBoL2luNU +jUSC8c4jw220TDg155ORYKP4Po6cZdckMm1GoH5As2Qc7+GfvPsh9HT/PGFPsuJ S2YQ7lSSArD8FLydlWEkwlpK7TZZ14hzbhWHSHojTJhU3J3iDfc9ha23JhB8ytGv RgkmTsHt9aKbB3GAZr4hgt3GMxtEKw51wZowJBr0PLP+W8nrDiC7fj4SNIS63zBY 6qbE8XmXXDqALGtzsWPZ+pwUSvveBn5r6UXF+5nrt3CacmkzCgq+8CZ0TWBYBkaL l4VM2ErczzgvmpOmv72BTnFCN/j7JkFbf99gHFhLIPNMOSnUt2+CCH72mHIAT3kh zfQUeDxo1VhklJUKnHaH2s/Y/Sde/+CejR/E7aDTgVRbwZ75OXeoUJzAs3XUvSAG DDawmah09B08f4QEzBI+sQQrqF/Ol7iuEGxxZeIplFl8O8THzBsubSYF3RSu5SCg H9C9ataDmIiFBDjIndByzwzzZF5/tJRzsiofi2HlNFFUs0Pu9jaXIf7Fg+uS63Yw fD+0djodmvMp7T+yAVIGsPYaz3NYL2da4DImX9TnN+uEECU6k9d7GLYxVkHIROgk 0ghnCoGA1Nu8UyOjFw4PJ/vEABMf6ZPtC+5ixetEHpqHxK2LmgM= =kbce -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s--