From: Vinicius Monego <monego@posteo.net>
To: jgart@dismail.de, 51148@debbugs.gnu.org
Subject: [bug#51148] [PATCH] gnu: Add python-tinydb.
Date: Thu, 11 Nov 2021 05:24:54 +0000 [thread overview]
Message-ID: <e157567b9365be850509834e8f83423ea73c9901.camel@posteo.net> (raw)
In-Reply-To: <20211012054449.16935-1-jgart@dismail.de>
Hi jgart,
Em ter, 2021-10-12 às 01:44 -0400, jgart escreveu:
> * gnu/packages/databases.scm (python-tinydb): New variable.
> ---
> gnu/packages/databases.scm | 40
Don't miss your copyright in this file.
> ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/gnu/packages/databases.scm
> b/gnu/packages/databases.scm
> index b1dd44da1c..60970b9c8e 100644
> --- a/gnu/packages/databases.scm
> +++ b/gnu/packages/databases.scm
> @@ -579,6 +579,46 @@ the API, and provides features such as:
> @end itemize")
> (license license:bsd-3)))
>
> +(define-public python-tinydb
> + (package
> + (name "python-tinydb")
> + (version "4.5.2")
> + (source (origin
> + (method url-fetch)
> + (uri (pypi-uri "tinydb" version))
> + (sha256
> + (base32
> +
> "1x9c4s42930wwal3ds0plwb57kg5c3gj7kbpy64c29vq478b463x"))))
> + (build-system python-build-system)
The indentation is off below.
> + (arguments
> + ;; PyPi tarball does not contain tests and github repository
> does not
> + ;; have a setup.py file (only pyproject).
I recently noticed this pattern of shipping only Poetry in the
repository while at the same time not shipping tests in PyPI. I don't
know why this is happening or what we can do about it in guix, the best
for now is to source from PyPI and skip tests like in this package.
> + `(#:tests? #f
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'check
> + (lambda* (#:key inputs outputs tests? #:allow-other-
> keys)
> + (when tests?
> + (add-installed-pythonpath inputs outputs)
> + (setenv "PYTHONPATH" (string-append ".:" (getenv
> "PYTHONPATH")))
The two lines above are redundant. The second line is the manual way of
doing what the first one does. But if we don't have a way to run the
tests, I'd not override the check phase.
> + (invoke "pytest")))))))
> + (native-inputs
> + `(("python-pytest" ,python-pytest)
> + ("python-pytest-cov" ,python-pytest-cov)
> + ("python-pycodestyle" ,python-pycodestyle)
> + ("python-pyyaml" ,python-pyyaml)))
Test-related native inputs are also useless if tests can't run.
> + (propagated-inputs
> + `(("python-typing-extensions" ,python-typing-extensions)))
> + (home-page "https://github.com/msiemens/tinydb")
> + (synopsis
> + "TinyDB is a lightweight document oriented database")
Same line for the synopsis.
> + (description
> +"TinyDB is a lightweight document oriented database optimized for
> +your happiness. It's written in pure Python and has no external
> +dependencies. The targets are small apps that would be blown away
> by a
> +SQL-DB or an external database server.")
I'd suggest "TinyDB is a small document oriented database written in
pure Python with no external dependencies. [...]"
> + (license license:expat)))
> +
> (define-public python-pylibmc
> (package
> (name "python-pylibmc")
next prev parent reply other threads:[~2021-11-11 5:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 5:44 [bug#51148] [PATCH] gnu: Add python-tinydb jgart via Guix-patches via
2021-11-11 5:24 ` Vinicius Monego [this message]
2021-11-11 5:26 ` Vinicius Monego
2021-11-11 16:31 ` jgart via Guix-patches via
2021-11-12 3:45 ` [bug#51148] [PATCH v3] " jgart via Guix-patches via
2021-11-23 8:22 ` bug#51148: [PATCH] " Ludovic Courtès
2021-11-23 8:37 ` [bug#51148] " jgart via Guix-patches via
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e157567b9365be850509834e8f83423ea73c9901.camel@posteo.net \
--to=monego@posteo.net \
--cc=51148@debbugs.gnu.org \
--cc=jgart@dismail.de \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).