From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id Wp38Ok3Gc2TJDgAASxT56A (envelope-from ) for ; Sun, 28 May 2023 23:23:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KAhkOU3Gc2R/EwEAG6o9tA (envelope-from ) for ; Sun, 28 May 2023 23:23:25 +0200 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 61BEF4BE for ; Sun, 28 May 2023 23:23:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3Nr4-0003iB-LK; Sun, 28 May 2023 17:23:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3Nr2-0003hr-DH for guix-patches@gnu.org; Sun, 28 May 2023 17:23:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3Nr2-0003uW-5B for guix-patches@gnu.org; Sun, 28 May 2023 17:23:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3Nqw-0002tM-Mq; Sun, 28 May 2023 17:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35598] [PATCH v2] gnu: Add python-mesa. References: <20190506030507.5469-1-pritchard.calvin@gmail.com> In-Reply-To: <20190506030507.5469-1-pritchard.calvin@gmail.com> Resent-From: jlicht@fsfe.org Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Sun, 28 May 2023 21:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35598 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35598@debbugs.gnu.org Cc: Calvin Pritchard , Jelle Licht , Lars-Dominik Braun , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , jgart Received: via spool by 35598-submit@debbugs.gnu.org id=B35598.168530897211082 (code B ref 35598); Sun, 28 May 2023 21:23:02 +0000 Received: (at 35598) by debbugs.gnu.org; 28 May 2023 21:22:52 +0000 Received: from localhost ([127.0.0.1]:54742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3NqY-0002sS-9x for submit@debbugs.gnu.org; Sun, 28 May 2023 17:22:52 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:52576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3NqV-0002sH-U3 for 35598@debbugs.gnu.org; Sun, 28 May 2023 17:22:37 -0400 From: jlicht@fsfe.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1685308952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Ei3CieKs+UtTPkr6LIWMR1IyU51QQzsKZ2SL1zuQbkE=; b=BDvppyDay2pAwac8c6y1js2EG8W5854oeKl42ugirQNcoWP6cLngMAzmVgVLOz8uoRCthe 8d4gssfaMtuT28IFiyyaOIiHQeKOQveG6IH5fSuUwav14cQ9smgMDJ5LXTdeK973/D6l5z cLwphL8xEWUs89O+WvuA+dLbOSnx6Xc= Date: Sun, 28 May 2023 23:21:02 +0200 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685309005; a=rsa-sha256; cv=none; b=MZqjHW7w95FGJyQy546iwm+F01Q/hBAIIYGWmBErYymTIosrvFg8pJ6nCGxWdUhuYWzd9h UE6XIDEL5zMSRFg2nGe0rKZBBQsLt4TxXaT0IWppNlwCQvR0TjvSBwHcCnx3AtYvf8zSBq g0lTcy2t4MGZ/eIAaTc/ILE4Vr88zQuo+dTz+jO/MOuicZwRckTEzQFldwe8f4euferi7U 1MoqsgjQZfmhVNch4eqSFgVFlyo8s4nsiHUn3loYhBY7ULWWRE6IzIqeEYsi0coT+9O7cj 3WxjhwFUwu+/GyYJFAK42j8vW1J98b/WJ9PdOO7jXRCC2ZV7zhbZBKGZE8gMEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=BDvppyDa; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685309005; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Ei3CieKs+UtTPkr6LIWMR1IyU51QQzsKZ2SL1zuQbkE=; b=ooyT7FSeoWrkr5wy6I1jw1VzBXLurDSi4Yv7vjcVx4UKQINSahmGDYHdygJb7jqDoceh+a 2RmcVDSo9B5dtR0dMBQx4ShjLxeibvILQKMfsx6mAWvw7Tc7oOxLdhxb0msA5Fq5T/wYMA w+4G3yaOBkX4zGTM/RTqD/fFxmk1IYnYq4jXaiWf+jNGQSCSl3BKEGCKYy+Qlb3DrG8azt v+3CiVdWBYzwYrFsxsZULbxDx4Yno+8fLzhv4yCmgUDMOoopSy4oMd3kz7acbo7h+fgDxs SCKKTKfhf3hbd3LXj3yu46r/qM4S09PWk/GD4DrS0LlO+nmxTxTTvGjHvruOew== X-Migadu-Spam: Yes X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=BDvppyDa; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Spam: Yes X-Migadu-Spam-Score: 8.85 X-Spam-Score: 8.85 X-Migadu-Queue-Id: 61BEF4BE X-TUID: jEwZHdi14SQO From: Calvin Pritchard * gnu/packages/python-xyz.scm (python-mesa). New variable. Co-authored-by: Jelle Licht --- Changes in v2: - Drop all dependency patches, as those packages now exist - Use pyproject-build-system - Reworked to modern packaging standards - Update mesage package version to 1.2.1. gnu/packages/python-xyz.scm | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index f7e3f6f538..be89df2fa1 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -2305,6 +2305,69 @@ (define-public python-license-expression conventions and aliases in the same expression.") (license license:gpl2+))) +(define-public python-mesa + (package + (name "python-mesa") + (version "1.2.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "Mesa" version)) + (sha256 + (base32 + "01504d2bgfwsg92942k34fi7adq5n9r1fw4sn5kx0sm70jwq1628")))) + (build-system pyproject-build-system) + (arguments + (list + #:modules '((guix build pyproject-build-system) + (guix build utils) + (ice-9 match) + (srfi srfi-1)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-cookiecutter + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "mesa/main.py" + (("\"cookiecutter\"") + (string-append "\"" + (search-input-file inputs "/bin/cookiecutter") + "\""))))) + (add-after 'build 'set-HOME + ;; Some tests write to $HOME. + (lambda _ (setenv "HOME" "/tmp"))) + (replace 'compile-bytecode + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((site-dir (site-packages inputs outputs)) + (python (assoc-ref inputs "python")) + (major-minor (map string->number + (take (string-split (python-version python) + #\.) + 2))) + (<3.7? (match major-minor + ((major minor) + (or (< major 3) + (and (= major 3) + (< minor 7))))))) + (unless <3.7? + ;; The cookiecutter-mesa directory contains project templates that + ;; should not be compiled. + (invoke "python" "-m" "compileall" + "-x" "cookiecutter-mesa" + "--invalidation-mode=unchecked-hash" site-dir)))))))) + (propagated-inputs (list python-click + python-networkx + python-numpy + python-pandas + python-tornado + python-tqdm)) + (inputs (list python-cookiecutter)) + (native-inputs (list python-coverage python-pytest python-pytest-cov)) + (home-page "https://github.com/projectmesa/mesa") + (synopsis "Agent-based modeling (ABM) in Python") + (description "Mesa is an agent-based modeling framework in Python. It contains +core components to implement spatial models, schedule agents and visualize model +runs.") + (license license:asl2.0))) + (define-public python-wand (package (name "python-wand") base-commit: 9845e408e533f5834a13f294ca1ddc1dc7e248fd -- 2.40.1