all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Vagrant Cascadian <vagrant@reproducible-builds.org>
Cc: 60941@debbugs.gnu.org
Subject: [bug#60941] [PATCH 1/2] gnu: Add python-pypdf.
Date: Wed, 18 Jan 2023 20:42:11 -0500	[thread overview]
Message-ID: <87pmbbe1vw.fsf@gmail.com> (raw)
In-Reply-To: <87edrrz4nd.fsf@contorta> (Vagrant Cascadian's message of "Wed, 18 Jan 2023 17:36:54 -0800")

Hello,

Vagrant Cascadian <vagrant@reproducible-builds.org> writes:

> From e2082819efee20a72b026eebcfc14af279e424c7 Mon Sep 17 00:00:00 2001
> From: Vagrant Cascadian <vagrant@reproducible-builds.org>
> Date: Wed, 18 Jan 2023 16:26:41 -0800
> Subject: [PATCH 1/2] gnu: Add python-pypdf.
>
> * gnu/packages/pdf.scm (python-pypdf): New varaible.
> ---
>  gnu/packages/pdf.scm | 39 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
>
> diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
> index 4b9d0623fe..cb94c29bde 100644
> --- a/gnu/packages/pdf.scm
> +++ b/gnu/packages/pdf.scm
> @@ -1260,6 +1260,45 @@ (define-public pdf2svg
>  converter using the Poppler and Cairo libraries.")
>      (license license:gpl2+)))
>  
> +(define-public python-pypdf
> +  (package
> +    (name "python-pypdf")
> +    (version "3.2.1")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "pypdf" version))
> +              (sha256
> +               (base32
> +                "1pdq4nbkknx61pk8w75jvx5j921m2676wfkyizsrap5mj92cssxc"))))
> +    (build-system python-build-system)

You should use pyproject-build-system, which knows how to build a
project from a PEP 517 build system.

> +    (arguments
> +     (list #:tests? #f ;pypi source does not contains tests

When this occurs, you can fetch from git instead.  Typically Python
packages come with test suites, and this one is no exception.

> +           #:phases #~(modify-phases %standard-phases
> +                        (replace 'build
> +                          (lambda _
> +                            (invoke "flit" "build")))
> +                        (replace 'install
> +                          (lambda* (#:key inputs outputs #:allow-other-keys)
> +                            (add-installed-pythonpath inputs outputs)
> +                            (for-each (lambda (wheel)
> +                                        (invoke "python"
> +                                                "-m"
> +                                                "pip"
> +                                                "install"
> +                                                wheel
> +                                                (string-append "--prefix="
> +                                                               #$output)))
> +                                      (find-files "dist" "\\.whl$")))))))
> +    (native-inputs (list python-flit))
> +    (propagated-inputs (list python-typing-extensions))
> +    (home-page "https://github.com/py-pdf/pypdf")
> +    (synopsis
> +     "A pure-python PDF library")

guix lint should complain about the leading determinant ("A").

> +    (description
> +     "This package provides a pure-python PDF library capable of splitting, merging,
> +cropping, and transforming PDF files")

Missing period, and "pure-python" is odd.  Perhaps just "This package
provides a Python PDF library [...]"

-- 
Thanks,
Maxim




  parent reply	other threads:[~2023-01-19  1:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19  1:31 [bug#60941] Update diffoscope to 232 Vagrant Cascadian
     [not found] ` <handler.60941.B.16740919305557.ack@debbugs.gnu.org>
2023-01-19  1:36   ` [bug#60941] [PATCH 1/2] gnu: Add python-pypdf Vagrant Cascadian
2023-01-19  1:38     ` [bug#60941] [PATCH 2/2] gnu: diffoscope: Update to 232 Vagrant Cascadian
2023-01-19  1:48       ` [bug#60941] Update diffoscope " Maxim Cournoyer
2023-01-22  3:26         ` Vagrant Cascadian
2023-01-23  1:04           ` Maxim Cournoyer
2023-01-22  3:32       ` [bug#60941] [PATCH v2 2/2] gnu: diffoscope: Update to 233 Vagrant Cascadian
2023-01-19  1:42     ` Maxim Cournoyer [this message]
2023-01-22  3:30     ` [bug#60941] [PATCH v2 1/2] gnu: Add python-pypdf Vagrant Cascadian
2023-01-22  7:03       ` [bug#60941] [PATCH v3 " Vagrant Cascadian
2023-01-22  7:06         ` [bug#60941] [PATCH v3 2/2] gnu: diffoscope: Update to 233 Vagrant Cascadian
2023-01-23  1:07           ` bug#60941: " Maxim Cournoyer

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=87pmbbe1vw.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=60941@debbugs.gnu.org \
    --cc=vagrant@reproducible-builds.org \
    /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.