From: Marius Bakke <mbakke@fastmail.com>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>, 30341@debbugs.gnu.org
Subject: [bug#30341] [PATCH 4/4] gnu: Add bpython.
Date: Thu, 15 Feb 2018 13:13:44 +0100 [thread overview]
Message-ID: <87bmgqwivb.fsf@fastmail.com> (raw)
In-Reply-To: <20180203222735.14042-3-h.goebel@crazy-compilers.com>
[-- Attachment #1: Type: text/plain, Size: 4366 bytes --]
Hartmut Goebel <h.goebel@crazy-compilers.com> writes:
> * gnu/packages/python.scm (bpython, bpython2): New variables.
[...]
> +(define-public bpython
> + (package
> + (name "bpython")
> + (version "0.17")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "bpython" version))
> + (sha256
> + (base32
> + "1mbah208jhd7bsfaa17fwpi55f7fvif0ghjwgrjmpmx8w1vqab9l"))
> + (file-name (string-append name "-" version ".tar.gz"))))
I think (file-name ...) here is unnecessary, no?
> + (build-system python-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'remove-failing-test ;; FIXME
> + (lambda _
> + (delete-file "bpython/test/test_args.py")))
#t))
Could you add some information about why this is deleted?
> + (add-after 'wrap 'add-aliases
> + ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out")))
> + (for-each
> + (lambda (old new)
> + (symlink old ;; (string-append out "/bin/" old)
^^^ leftover comment? :)
> + (string-append out "/bin/" new)))
> + '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
> + '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3"))))))))
#t)))
> + (propagated-inputs
> + `(("python-pygments" ,python-pygments)
> + ("python-requests", python-requests)
> + ("python-babel" ,python-babel) ;; optional, for internationalization
> + ("python-curtsies" ,python-curtsies) ;; >= 0.1.18
> + ("python-greenlet" ,python-greenlet)
> + ("python-urwid" ,python-urwid) ;; for bpython-urwid only
^^^
only one semicolon for inline comments.
> + ("python-six" ,python-six)))
> + (native-inputs
> + `(("python-sphinx" ,python-sphinx)
> + ("python-mock" ,python-mock)))
> + (home-page "https://bpython-interpreter.org/")
> + (synopsis "Fancy interface to the Python interpreter")
> + (description "Bpython is a fancy interface to the Python
> +interpreter. bpython's main features are
> +
> +@enumerate
> +@item in-line syntax highlighting,
> +@item readline-like autocomplete with suggestions displayed as you type,
> +@item expected parameter list for any Python function,
> +@item \"rewind\" function to pop the last line of code from memory and
> + re-evaluate,
> +@item send the code you've entered off to a pastebin,
> +@item save the code you've entered to a file, and
> +@item auto-indentation.
> +@end enumerate")
> + (license license:expat)))
> +
> +(define-public bpython2
> + (let ((base (package-with-python2
> + (strip-python2-variant bpython))))
> + (package (inherit base)
> + (name "bpython2")
> + (arguments
> + `(#:python ,python-2
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'remove-failing-test ;; FIXME
> + (lambda _
> + (delete-file "bpython/test/test_args.py")
> + (substitute* "bpython/test/test_curtsies_repl.py"
> + (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
> + (string-append a "xxx_off_" b))
> + (("^(\\s*def )(test_complex\\W)" _ a b)
> + (string-append a "xxx_off_" b)))))
#t))
I'm not sure what's going on here, can you add a comment?
Other than that looks good, thanks!
> + (add-before 'build 'rename-scripts
> + ;; rename the scripts to bypthon2, bpdb2, etc.
> + (lambda _
> + (substitute* "setup.py"
> + (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
> + (string-append name "2" rest "\n"))
> + (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
> + (string-append name "2" (or sub "") rest "\n")))
> + #t))))))))
> --
> 2.13.6
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 483 bytes --]
next prev parent reply other threads:[~2018-02-15 12:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-03 22:22 [bug#30341] [PATCH 1/4] gnu: Add python-pyte Hartmut Goebel
2018-02-03 22:27 ` [bug#30341] [PATCH 2/4] gnu: Add python-blessings Hartmut Goebel
2018-02-03 22:27 ` [bug#30341] [PATCH 3/4] gnu: Add python-curtsies Hartmut Goebel
2018-02-15 12:07 ` Marius Bakke
2018-02-03 22:27 ` [bug#30341] [PATCH 4/4] gnu: Add bpython Hartmut Goebel
2018-02-15 12:13 ` Marius Bakke [this message]
2018-02-15 20:45 ` bug#30341: " Hartmut Goebel
2018-02-15 12:04 ` [bug#30341] [PATCH 2/4] gnu: Add python-blessings Marius Bakke
2018-02-15 11:58 ` [bug#30341] [PATCH 1/4] gnu: Add python-pyte Marius Bakke
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=87bmgqwivb.fsf@fastmail.com \
--to=mbakke@fastmail.com \
--cc=30341@debbugs.gnu.org \
--cc=h.goebel@crazy-compilers.com \
/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).