From patchwork Tue Oct 20 10:58:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Giacomo Leidi X-Patchwork-Id: 24705 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B73DE27BBEE; Tue, 20 Oct 2020 12:02:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, T_DKIM_INVALID,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EC09927BBED for ; Tue, 20 Oct 2020 12:02:04 +0100 (BST) Received: from localhost ([::1]:51736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUpP1-00042E-P3 for patchwork@mira.cbaines.net; Tue, 20 Oct 2020 07:02:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUpN5-0002rp-KH for guix-patches@gnu.org; Tue, 20 Oct 2020 07:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60407) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kUpN5-00069P-1S for guix-patches@gnu.org; Tue, 20 Oct 2020 07:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kUpN4-0005cE-Td for guix-patches@gnu.org; Tue, 20 Oct 2020 07:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41807] [PATCHES] Add python-sanic and dependencies. Resent-From: paul Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Oct 2020 11:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41807 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Lars-Dominik Braun Cc: 41807@debbugs.gnu.org X-Debbugs-Original-Cc: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160319155021489 (code B ref -1); Tue, 20 Oct 2020 11:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Oct 2020 10:59:10 +0000 Received: from localhost ([127.0.0.1]:43720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUpM6-0005aM-CS for submit@debbugs.gnu.org; Tue, 20 Oct 2020 06:59:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:37018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUpM1-0005Zu-Kp for submit@debbugs.gnu.org; Tue, 20 Oct 2020 06:59:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUpM1-0002Mu-CJ for guix-patches@gnu.org; Tue, 20 Oct 2020 06:58:57 -0400 Received: from latitanza.investici.org ([2001:888:2000:56::19]:32931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUpLt-00060x-FQ for guix-patches@gnu.org; Tue, 20 Oct 2020 06:58:57 -0400 Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4CFrG205bxz8sgQ; Tue, 20 Oct 2020 10:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1603191514; bh=/Xuc0ivTZopzG8QDlOPIapNAas9O/ARacM32bt1+zkM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=JkF3CaZ2zGsEvS0BjgKY1ujYIYO6vxmqIKrCqgiEyXm0EpovRpuxJGPztC8YXmiDv sJLE0JdBiFPziN13oNIcEqK9AFaoywM7UDZ9en10Xg4eM4+Y0Ojm9yxGwyRzFOQZVy WAlqQ0wB11zx3eNVuqnZtFZ8digwCNKwe97oMMPA= Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4CFrG15FVtz8sfr; Tue, 20 Oct 2020 10:58:33 +0000 (UTC) References: <20200617064940.GA5119@zpidnp36> From: paul Message-ID: <8c50cb48-c90c-9c2d-b2d5-5186cf4c688a@autistici.org> Date: Tue, 20 Oct 2020 12:58:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Icedove/78.3.2 MIME-Version: 1.0 In-Reply-To: <20200617064940.GA5119@zpidnp36> Content-Language: en-US Received-SPF: pass client-ip=2001:888:2000:56::19; envelope-from=goodoldpaul@autistici.org; helo=latitanza.investici.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi :), I apologize for the long delay, On 6/17/20 8:49 AM, Lars-Dominik Braun wrote: > Hi, > >> I'm sending a patch series to add python-sanic, its dependencies and some >> dependencies of mypy. > I’ve got Sanic 19.12 in my own channel[1], which I wanted to upstream for a > long time now. Most packages have tests enabled, because I managed to package > that really old httpcore. Do you want to try and port these to sanic 20.03? > > Cheers, > Lars > > [1] https://github.com/leibniz-psychology/guix-zpid/blob/master/zpid/packages/sanic.scm > I managed to package sanic following your channel definition (and enabled tests), I updated some packages, removed some other packages that were already merged in Guix and produced an updated patch set. Thank you for your patience, Giacomo From c19961406504ba9e90e836b30751f68f1d4820d9 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Tue, 20 Oct 2020 12:51:27 +0200 Subject: [PATCH 9/9] gnu: Add python-sanic. * gnu/packages/python-check.scm (python-pytest-sanic): New variable. * gnu/packages/python-web.scm (python-sanic): New variable. --- gnu/packages/python-check.scm | 28 +++++++++++++++++ gnu/packages/python-web.scm | 59 +++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 498f495584..caab81f18c 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -1044,3 +1044,31 @@ any Python VM with basically no runtime overhead.") (description "Robber is a Python assertion library for test-driven and behavior-driven development (TDD and BDD).") (license license:expat))) + +;; This is only used by python-sanic +(define-public python-pytest-sanic + (package + (name "python-pytest-sanic") + (version "1.6.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-sanic" version)) + (sha256 + (base32 + "02ajd8z77ahi69kzkz200qgxrb4s2j4qb6k8j9ds1kz6qa6fsa34")))) + (build-system python-build-system) + (arguments + ;; Tests depend on python-sanic. + `(#:tests? #f)) + (propagated-inputs + `(("python-aiohttp" ,python-aiohttp) + ("python-async-generator" + ,python-async-generator) + ("python-pytest" ,python-pytest))) + (home-page + "https://github.com/yunstanford/pytest-sanic") + (synopsis "Pytest plugin for Sanic") + (description "A pytest plugin for Sanic. It helps you to test your +code asynchronously.") + (license license:expat))) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index b0bbd66583..5aaf9fb03d 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -39,6 +39,7 @@ ;;; Copyright © 2020 Edouard Klein ;;; Copyright © 2020 Vinicius Monego ;;; Copyright © 2020 Konrad Hinsen +;;; Copyright © 2020 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -5185,3 +5186,61 @@ challenges.") "@code{python-hstspreload} contains Chromium HSTS Preload list as a Python package.") (license license:bsd-3))) + +(define-public python-sanic + (package + (name "python-sanic") + (version "20.9.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sanic" version)) + (sha256 + (base32 + "0h832ja7j1f2w0ylbx5vj0j5gv5j9gn1yhhspvq0yikjyrkg46yr")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'use-recent-pytest + ;; Allow using recent dependencies. + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "setup.py" + (("httpcore==0.3.0") "httpcore") + (("pytest==5.2.1") "pytest")) + #t)) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "./tests" "-k" + "not test_zero_downtime and not test_gunicorn_worker")))))) + (propagated-inputs + `(("python-aiofiles" ,python-aiofiles) + ("python-httptools" ,python-httptools) + ("python-httpx" ,python-httpx) + ("python-multidict" ,python-multidict) + ("python-ujson" ,python-ujson) + ("python-uvloop" ,python-uvloop) + ("python-websockets" ,python-websockets))) + (native-inputs + `(("gunicorn" ,gunicorn) + ("python-beautifulsoup4" ,python-beautifulsoup4) + ("python-hstspreload" ,python-hstspreload) + ("python-httpcore" ,python-httpcore) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-benchmark" ,python-pytest-benchmark) + ("python-pytest-sanic" ,python-pytest-sanic) + ("python-pytest-sugar" ,python-pytest-sugar) + ("python-urllib3" ,python-urllib3) + ("python-uvicorn" ,python-uvicorn))) + (home-page + "https://github.com/huge-success/sanic/") + (synopsis + "Async Python 3.6+ web server/framework") + (description + "Sanic is a Python 3.6+ web server and web framework +that's written to go fast. It allows the usage of the +@code{async/await} syntax added in Python 3.5, which makes +your code non-blocking and speedy.") + (license license:expat))) -- 2.28.0