Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #10947

Re: Byte-compilation for pypy3

From Piotr Ożarowski <piotr@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: Byte-compilation for pypy3
Date 2018-09-28 00:00 +0200
Message-ID <wCMue-8v4-1@gated-at.bofh.it> (permalink)
References <wrf8B-Ua-1@gated-at.bofh.it> <wrlH3-4QW-3@gated-at.bofh.it> <wrlQJ-4Ua-1@gated-at.bofh.it> <wrlQJ-4Ua-9@gated-at.bofh.it> <wrsfv-hF-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

> > err again (sorry, to many things at once), I meant option 4 (I can
> > change dh-python to generate additional checks for pypy{compile,clean})
>
> That'd be pypy3{compile,clean}

this is now available in dh-python 3.20180927. Only postinst files are
checking for pypy3compile, though. py3clean in prerm will remove .pyc
generated by PyPy3 as well (so no need to call pypy3clean in there)

> OK, so, now to figure out the "magic" part (byte-compiling already
> installed modules when pypy3 is installed / removed.
>
> Should I run the runtime.d directory? Currently everything in that will
> only do things with cpython bytecode.
>
> Apps that aren't in dist-packages probably don't need pypy3 bytecode,
> unless they want to be run with pypy.
>
> Anything that tries to determine the version (e.g
> /usr/share/python3/runtime.d/public_modules.rtinstall and
> /usr/share/python3/runtime.d/public_modules.rtremove) looks like they
> would break if I told them the version was pypy3.
>
> So, I'm somewhat tempted to ignore runtime.d entirely, and just
> byte-compile /usr/lib/python3/dist-packages. That seems pretty hacky,
> though :/

I think we should create a separate runtime.d for pypy3 and a separate one
for bcep files as well while we're at it.

FTR: bcep files are used to describe files that py3compile should avoid.
F.e. files meant for Python >= 3.6 ('async' keyword, etc.) should not be
byte-compiled using python3.5 (see dh_python3's manpage for details or
python3-jinja2 and pylint3 binary packages for examples).

Since we will share dist-package directory, we'll need to describe
exceptions for pypy3compile. One way is to extend version range syntax
in current /usr/share/python3/bcep/ files but I'd rather have separate
/usr/share/pypy/bcep/ used by pypy3compile.

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Byte-compilation for pypy3 Stefano Rivera <stefanor@debian.org> - 2018-08-27 04:10 +0200
  Re: Byte-compilation for pypy3 teng zhaozhi <freet15@gmail.com> - 2018-08-27 07:50 +0200
  Re: Byte-compilation for pypy3 Piotr Ożarowski <piotr@debian.org> - 2018-08-27 11:10 +0200
    Re: Byte-compilation for pypy3 Piotr Ożarowski <piotr@debian.org> - 2018-08-27 11:20 +0200
      Re: Byte-compilation for pypy3 Piotr Ożarowski <piotr@debian.org> - 2018-08-27 11:20 +0200
        Re: Byte-compilation for pypy3 Stefano Rivera <stefanor@debian.org> - 2018-08-27 18:10 +0200
          Re: Byte-compilation for pypy3 Piotr Ożarowski <piotr@debian.org> - 2018-09-28 00:00 +0200

csiph-web