[PATCH] gnu: Add emacs-pyimport.

  • Done
  • quality assurance status badge
Details
3 participants
  • jgart
  • Nicolas Goaziou
  • Maxime Devos
Owner
unassigned
Submitted by
jgart
Severity
normal
J
J
jgart wrote on 2 Apr 2022 04:58
(address . guix-patches@gnu.org)(name . jgart)(address . jgart@dismail.de)
20220402025855.19353-1-jgart@dismail.de
* gnu/packages/emacs-xyz.scm (emacs-pyimport): New variable.

Hi Guixers,

Here is emacs-pyimport.

Also available as a pre-release at https://whereis.???/

all best,

jgart
---
gnu/packages/emacs-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index bc9a9f1c28..5b17fd9b65 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -30828,6 +30828,43 @@ (define-public emacs-org-modern
headlines, keywords, tables and source blocks.")
(license license:gpl3+)))
+(define-public emacs-pyimport
+ (let ((commit "a6f63cf7ed93f0c0f7c207e6595813966f8852b9")
+ (revision "0"))
+ (package
+ (name "emacs-pyimport")
+ (version (git-version "1.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/Wilfred/pyimport")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1q5gqhvh4zq5dy8vns694warcz48j1hdnxg16sjck4gsi9xivbvs"))))
+ (build-system emacs-build-system)
+ (inputs
+ (list python-pyflakes))
+ (propagated-inputs
+ (list emacs-dash emacs-s emacs-shut-up))
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-pyflakes-executable
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((python-pyflakes (assoc-ref inputs "python-pyflakes")))
+ (make-file-writable "pyimport.el")
+ (substitute* "pyimport.el"
+ (("\"pyflakes")
+ (string-append "\"" python-pyflakes "/bin/pyflakes")))))))))
+ (home-page "https://github.com/Wilfred/pyimport")
+ (synopsis "Manage Python imports from Emacs")
+ (description
+"@code{emacs-pyimport} manages python imports from Emacs via @code{python-pyflakes}.")
+ (license license:gpl3+)))) ; License is in pyimport.el
+
(define-public emacs-osm
(package
(name "emacs-osm")
--
2.34.0
M
M
Maxime Devos wrote on 4 Apr 2022 20:14
9c184e24836dbfc0c480284cc90a43797a380a58.camel@telenet.be
jgart via Guix-patches via schreef op vr 01-04-2022 om 22:58 [-0400]:
Toggle quote (6 lines)
> +                      (let ((python-pyflakes (assoc-ref inputs "python-pyflakes")))
> +                        (make-file-writable "pyimport.el")
> +                        (substitute* "pyimport.el"
> +                          (("\"pyflakes")
> +                           (string-append "\"" python-pyflakes "/bin/pyflakes")))))))))

Input labels can be avoided here:

(substitute* ...
...
(string-append ... (search-input-file inputs "bin/pyflakes")))

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYks1mhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pCXAPsGwBP0A3m0M7N4sAGsC+ItST4k
EWCb2AQdJMdS8zYeIAEAv9LY5YUHYMyWjX9PomWtERa0Ipdlj90MSAa3Nnq6xQA=
=DzSI
-----END PGP SIGNATURE-----


J
J
jgart wrote on 5 Apr 2022 22:48
[PATCH v2] gnu: Add emacs-pyimport.
(address . 54678@debbugs.gnu.org)
20220405204839.19146-1-jgart@dismail.de
* gnu/packages/emacs-xyz.scm (emacs-pyimport): New variable.

Hi Maxime,

Here's a v2 with your suggestions.

Thanks for the code review.

all best,

jgart

---
gnu/packages/emacs-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index bc9a9f1c28..dcd1f07916 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -30828,6 +30828,43 @@ (define-public emacs-org-modern
headlines, keywords, tables and source blocks.")
(license license:gpl3+)))
+(define-public emacs-pyimport
+ (let ((commit "a6f63cf7ed93f0c0f7c207e6595813966f8852b9")
+ (revision "0"))
+ (package
+ (name "emacs-pyimport")
+ (version (git-version "1.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/Wilfred/pyimport")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1q5gqhvh4zq5dy8vns694warcz48j1hdnxg16sjck4gsi9xivbvs"))))
+ (build-system emacs-build-system)
+ (inputs
+ (list python-pyflakes))
+ (propagated-inputs
+ (list emacs-dash emacs-s emacs-shut-up))
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-pyflakes-executable
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((pyflakes (search-input-file inputs "/bin/pyflakes")))
+ (make-file-writable "pyimport.el")
+ (substitute* "pyimport.el"
+ (("\"pyflakes")
+ (string-append "\"" pyflakes)))))))))
+ (home-page "https://github.com/Wilfred/pyimport")
+ (synopsis "Manage Python imports from Emacs")
+ (description
+"@code{emacs-pyimport} manages python imports from Emacs via @code{python-pyflakes}.")
+ (license license:gpl3+)))) ; License is in pyimport.el
+
(define-public emacs-osm
(package
(name "emacs-osm")
--
2.34.0
M
M
Maxime Devos wrote on 9 May 2022 19:49
0b5476fc140564d583bd341e1356e200025f37c1.camel@telenet.be
jgart schreef op di 05-04-2022 om 16:48 [-0400]:
Toggle quote (2 lines)
> +      (license license:gpl3+)))) ; License is in pyimport.el

The license header is present, but the actual license text is missing,
and the GPL requires:

Toggle quote (2 lines)
> and give all recipients a copy of this License along with the Program.

Looks like upstream forgot a file ...

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYnlUHBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gPrAQDqNy+JD3OlcuvTt4T67BrfQnOH
wRZpdWnjETgDHU7GowD+MasvK9F6pTRwN7/qk2TGAV0cGG95nKN4YKFYqSAMrws=
=AO/o
-----END PGP SIGNATURE-----


N
N
Nicolas Goaziou wrote on 8 Jun 2022 00:15
Re: [bug#54678] [PATCH v2] gnu: Add emacs-pyimport.
(name . jgart via Guix-patches via)(address . guix-patches@gnu.org)
8735ggqfvq.fsf@nicolasgoaziou.fr
Hello,

jgart via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (2 lines)
> * gnu/packages/emacs-xyz.scm (emacs-pyimport): New variable.

Applied. Thank you.

Regards,
--
Nicolas Goaziou
M
M
Maxime Devos wrote on 8 Jun 2022 09:52
e91830ec5bced3ba0925b0e48d48dddb8b944a83.camel@telenet.be
reopen 54678
thanks

Nicolas Goaziou schreef op wo 08-06-2022 om 00:15 [+0200]:
Toggle quote (6 lines)
> jgart via Guix-patches via <guix-patches@gnu.org> writes:
>
> > * gnu/packages/emacs-xyz.scm (emacs-pyimport): New variable.
>
> Applied. Thank you.


Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqBVIRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qOxAQDfi0AiR+uHQSsu7ULDx8v5ztuZ
C52TvUdtQtjfl5eZawD+Mg4kcKGFEPsTVdwMfSif2n+0WzVm47BCjeDY+KudrAQ=
=JPD6
-----END PGP SIGNATURE-----


N
N
Nicolas Goaziou wrote on 10 Jun 2022 11:08
(name . Maxime Devos)(address . maximedevos@telenet.be)
87tu8sq41c.fsf@nicolasgoaziou.fr
Hello,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (12 lines)
> reopen 54678
> thanks
>
> Nicolas Goaziou schreef op wo 08-06-2022 om 00:15 [+0200]:
>> jgart via Guix-patches via <guix-patches@gnu.org> writes:
>>
>> > * gnu/packages/emacs-xyz.scm (emacs-pyimport): New variable.
>>
>> Applied. Thank you.
>
> What about <https://issues.guix.gnu.org/54678#3>?

I asked a similar question for a different package some months (years?)
ago. The decision was that we should assume good faith from the author,
even if the licensing is not perfect. In this situation, upstream intent
is clear, so there is no real issue.

Of course, it would be nice to help upstream have a correct licensing
process.

Regards,
--
Nicolas Goaziou
M
M
Maxime Devos wrote on 10 Jun 2022 17:05
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
992c9fc10ca86c75019b77bcf06416d3a116570c.camel@telenet.be
Nicolas Goaziou schreef op vr 10-06-2022 om 11:08 [+0200]:
Toggle quote (11 lines)
> [...]
> I asked a similar question for a different package some months (years?)
> ago. The decision was that we should assume good faith from the author,
> even if the licensing is not perfect. In this situation, upstream intent
> is clear, so there is no real issue.
>
> Of course, it would be nice to help upstream have a correct licensing
> process.
>
> Regards,

Thanks for your answer, I'll keep it in mind.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqNdyxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oIoAQDDGhM3rwfUhnUAudapHYm9ZjYh
eRDuSgvCpOoaYlJ/gwEAkfm7MmFnzFY3nkfxGlInkn7kcjbu4Hxjry0OVhhTEQ8=
=G1vo
-----END PGP SIGNATURE-----


?
Your comment

This issue is archived.

To comment on this conversation send an email to 54678@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54678
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch