From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 05 13:45:37 2020 Received: (at submit) by debbugs.gnu.org; 5 Feb 2020 18:45:37 +0000 Received: from localhost ([127.0.0.1]:46721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izPg9-0002xW-I5 for submit@debbugs.gnu.org; Wed, 05 Feb 2020 13:45:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:43392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izPg6-0002xN-3B for submit@debbugs.gnu.org; Wed, 05 Feb 2020 13:45:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58329) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izPg4-0005wJ-Uf for guix-patches@gnu.org; Wed, 05 Feb 2020 13:45:33 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, T_FILL_THIS_FORM_SHORT autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izPg3-000440-SN for guix-patches@gnu.org; Wed, 05 Feb 2020 13:45:32 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:57776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1izPg3-0003M1-JF for guix-patches@gnu.org; Wed, 05 Feb 2020 13:45:31 -0500 Received: (qmail 18469 invoked by uid 1009); 5 Feb 2020 19:45:22 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25716. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.01068 secs); 05 Feb 2020 18:45:22 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 5 Feb 2020 19:45:22 +0100 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= To: guix-patches@gnu.org Subject: [PATCH] import: pypi: Support exporting packages with .zip source. Date: Wed, 5 Feb 2020 19:45:48 +0100 Message-Id: <20200205184548.6555-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 37.59.186.212 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: submit 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: -1.7 (-) * guix/import/pypi.scm (make-pypi-sexp): Rename test-inputs to native-inputs. Restructure the way pypi-uri parameters are generated. Use pypi-uri's extension parameter when required. Add "unzip" to native inputs when the package source is a zip file. --- guix/import/pypi.scm | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 354cae9c4c..a02644ff55 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -363,7 +363,11 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE." (receive (guix-dependencies upstream-dependencies) (compute-inputs source-url wheel-url temp) (match guix-dependencies - ((required-inputs test-inputs) + ((required-inputs native-inputs) + (when (string-suffix? ".zip" source-url) + (set! native-inputs (cons + '("unzip" ,unzip) + native-inputs))) (values `(package (name ,(python->package-name name)) @@ -371,20 +375,29 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE." (source (origin (method url-fetch) - ;; PyPI URL are case sensitive, but sometimes a project - ;; named using mixed case has a URL using lower case, so - ;; we must work around this inconsistency. For actual - ;; examples, compare the URLs of the "Deprecated" and - ;; "uWSGI" PyPI packages. - (uri ,(if (string-contains source-url name) - `(pypi-uri ,name version) - `(pypi-uri ,(string-downcase name) version))) + (uri (pypi-uri + ;; PyPI URL are case sensitive, but sometimes + ;; a project named using mixed case has a URL + ;; using lower case, so we must work around this + ;; inconsistency. For actual examples, compare + ;; the URLs of the "Deprecated" and "uWSGI" PyPI + ;; packages. + ,(if (string-contains source-url name) + name + (string-downcase name)) + version + ;; Some packages have been released as `.zip` + ;; instead of the more common `.tar.gz`. For + ;; example, see "path-and-address". + ,@(if (string-suffix? ".zip" source-url) + '(".zip") + '()))) (sha256 (base32 ,(guix-hash-url temp))))) (build-system python-build-system) ,@(maybe-inputs required-inputs 'propagated-inputs) - ,@(maybe-inputs test-inputs 'native-inputs) + ,@(maybe-inputs native-inputs 'native-inputs) (home-page ,home-page) (synopsis ,synopsis) (description ,description) -- 2.25.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 05 16:04:53 2020 Received: (at 39443-done) by debbugs.gnu.org; 5 Feb 2020 21:04:53 +0000 Received: from localhost ([127.0.0.1]:46858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izRqv-0008GS-5f for submit@debbugs.gnu.org; Wed, 05 Feb 2020 16:04:53 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:52161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izRqt-0008G5-Mt for 39443-done@debbugs.gnu.org; Wed, 05 Feb 2020 16:04:52 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id D3F1970A; Wed, 5 Feb 2020 16:04:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 05 Feb 2020 16:04:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm2; bh=RuDu0bDiNP2upSze0MfC31s8mU uHVWqTpHoHi83v/5s=; b=pEuvIrnqirilGZ3gE14OkM8jsDx7qzLoYM6/du4+IE 2PaFJxwLGykmZYQ2NkPlamyJ79xaQNHpXiKSQRAykChMLusKiV04OIioyrBR/prH +A9zjBPCA+eqMwsqZpNTO8RxEOf6JUuPbQ/R9iHiX28p+C1KFtNsi5WXlF0mR0f5 ygulY7mjec0gyVtM7ARw2DyJT8C0ays4/H2/eqhwixxAYGRX6mvnJ5Kv/T3FAr+1 eCwf/sRsP3DMtMynqaJIztAoXFMujJ909n6KBf7KPFaNHCEAayWOld3uJpdSJOTk x1zOHI1O+ZDk2UotYknSILdpUSe2YJtxWfi/vC79nDuw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=RuDu0b DiNP2upSze0MfC31s8mUuHVWqTpHoHi83v/5s=; b=DrU4D/2CcgPuY0ovrPM5Bn ou5wxW+KhnBjow80e6jthtImDHtNUkIwR7QYH3tuaKoH1ukk02LTeJejeIPvkQa6 MMN2mIEkAIbYGAuAo/8xq7nDPRJoyTPr/Yqw3+Rnq87wmEO7Pz68pu/iH40G526a rYKdblma8kXCrslFjlTGh1+QZ4nsIkcyCRhztfjHqQnknAI348rBxh3brPpM/gJD ZljMIOzpEOf3EVloCH9KGxxvrCZ6MRVRrR8ko0xMk5iFuaKUcL5hK5NlXrVxxCxH g34jLysQCy+eBGW0jLJ4pWVyq2qzGxvbDU8MqmGhxDy5pTz787Ss3O+OLycyqntw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrhedugddufeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffgffkfggtgesghdtre ertderjeenucfhrhhomhepofgrrhhiuhhsuceurghkkhgvuceomhgsrghkkhgvsehfrghs thhmrghilhdrtghomheqnecukfhppeekgedrvddtvddrieelrddvheefnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgsrghkkhgvsehfrghs thhmrghilhdrtghomh X-ME-Proxy: Received: from localhost (ti0006q161-3035.bb.online.no [84.202.69.253]) by mail.messagingengine.com (Postfix) with ESMTPA id B595C3060272; Wed, 5 Feb 2020 16:04:44 -0500 (EST) From: Marius Bakke To: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= , 39443-done@debbugs.gnu.org Subject: Re: [bug#39443] [PATCH] import: pypi: Support exporting packages with .zip source. In-Reply-To: <20200205184548.6555-1-kuba@kadziolka.net> References: <20200205184548.6555-1-kuba@kadziolka.net> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Wed, 05 Feb 2020 22:04:42 +0100 Message-ID: <87pnes4ufp.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39443-done 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: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jakub K=C4=85dzio=C5=82ka writes: > * guix/import/pypi.scm (make-pypi-sexp): Rename test-inputs to > native-inputs. Restructure the way pypi-uri parameters are generated. > Use pypi-uri's extension parameter when required. Add "unzip" to > native inputs when the package source is a zip file. Applied, thanks! I also added a copyright line for you. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl47LeoACgkQoqBt8qM6 VPpvdgf/df0GHsULNrZcQyf0dUDI+bAKPLMao5SsiKgnpm5dmhY3jR9YSw180LIO Jr/fxrwiztkj+ZU6mDeaMKsA1L1WvTWio+3RyA+a5Z2FW4FgY1WUQIqxzaUBPb1k gqQ1KmmjH/CAIPsSZio9upNv9842k0eMzJJykSfN6ZJcnsMUMXvaSKu4E1MQOKhp IHQXUJRU/47AwWJlZtaJiIABG8/aNMzVnt88QJWKqU0W6SmVvq+CXQSrBSAwtVsk N4ZZH46TqgwUpOqV2Ju39NjORLtOPWyjLnyWfkvCadc/fCPSUUKYomaDhBMpgSke os/JwdATgjiT7VV8VTOChXbQFDRTMg== =ryGs -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Jun 14 03:54:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 05 Mar 2020 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator