From: jlicht@fsfe.org
To: 35598@debbugs.gnu.org
Cc: Calvin Pritchard <calvin.pritchard@asu.edu>,
Jelle Licht <jlicht@fsfe.net>, Lars-Dominik Braun <lars@6xq.net>,
jgart <jgart@dismail.de>
Subject: [bug#35598] [PATCH v2] gnu: Add python-mesa.
Date: Sun, 28 May 2023 23:21:02 +0200 [thread overview]
Message-ID: <ba771d68c45543fbd8c65e9bba7a012f85bd2fc2.1685308811.git.jlicht@fsfe.org> (raw)
In-Reply-To: <20190506030507.5469-1-pritchard.calvin@gmail.com>
From: Calvin Pritchard <calvin.pritchard@asu.edu>
* gnu/packages/python-xyz.scm (python-mesa). New variable.
Co-authored-by: Jelle Licht <jlicht@fsfe.net>
---
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
prev parent reply other threads:[~2023-05-28 21:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-06 3:05 [bug#35598] [PATCH 0/6] Add Mesa agent based modeling platform Calvin Pritchard
2019-05-06 3:05 ` [bug#35598] [PATCH 1/6] gnu: Add python-arrow Calvin Pritchard
2019-05-06 3:05 ` [bug#35598] [PATCH 2/6] gnu: Add python-whichcraft, python2-whichcraft Calvin Pritchard
2019-05-06 3:05 ` [bug#35598] [PATCH 3/6] gnu: Add python-poyo, python2-poyo Calvin Pritchard
2019-05-06 3:05 ` [bug#35598] [PATCH 4/6] gnu: Add python-jinja2-time Calvin Pritchard
2019-05-06 3:05 ` [bug#35598] [PATCH 5/6] gnu: Add python-cookiecutter Calvin Pritchard
2019-05-06 3:05 ` [bug#35598] [PATCH 6/6] gnu: Add python-mesa Calvin Pritchard
2019-05-06 5:30 ` [bug#35598] [PATCH 1/6] gnu: Add python-arrow Calvin Pritchard
2019-05-06 5:30 ` [bug#35598] [PATCH 2/6] gnu: Add python-whichcraft, python2-whichcraft Calvin Pritchard
2019-05-06 5:30 ` [bug#35598] [PATCH 3/6] gnu: Add python-poyo, python2-poyo Calvin Pritchard
2019-05-06 5:30 ` [bug#35598] [PATCH 4/6] gnu: Add python-jinja2-time Calvin Pritchard
2019-05-06 5:30 ` [bug#35598] [PATCH 5/6] gnu: Add python-cookiecutter Calvin Pritchard
2019-05-06 5:30 ` [bug#35598] [PATCH 6/6] gnu: Add python-mesa Calvin Pritchard
2019-05-12 21:58 ` [bug#35598] [PATCH 0/6] Add Mesa agent based modeling platform Ludovic Courtès
2023-05-28 21:21 ` jlicht [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ba771d68c45543fbd8c65e9bba7a012f85bd2fc2.1685308811.git.jlicht@fsfe.org \
--to=jlicht@fsfe.org \
--cc=35598@debbugs.gnu.org \
--cc=calvin.pritchard@asu.edu \
--cc=jgart@dismail.de \
--cc=jlicht@fsfe.net \
--cc=lars@6xq.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.