[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bits from the Debian PyCon Hangout - PyPy



On Thursday, April 16, 2015 06:45:08 PM Stefano Rivera wrote:
> Hi Scott (2015.04.15_18:30:23_+0200)
> 
> > If we are sharing dist-packages, then pypy can probably use the same
> > binary when the content would be the same. Only in cases where the
> > content is different would you duplicate a separate pypy package.
> 
> That works, but only for leaf packages. Transitive dependencies lose
> track of the interpreter metadata.
> 
> Let's say we have:
> 
> Package: pypy3-foo
> 
> Package: python3-foo
> 
> Package: python3-bar
> Provides: pypy3-bar
> Depends: python3-foo
> 
> If your app depends on just pypy3-foo, you're fine.
> 
> Depending on pypy3-bar is more complicated. bar has to either depend on
> both stacks, or the app has to know to depend on pypy3-foo, as well as
> pypy3-bar.

Sure.  I think it's manageable, at least for a small set of packages though 
(which AIUI should be good enough).  Here's what Python Policy currently says 
about python:Provides:

      <sect id="provides">
        <heading>Provides</heading>
        <p>
          Provides in binary packages of the form
          <package>python-<var>X</var>.<var>Y</var><var>>foo</var></package>
          must be specified if the package contains an extension for more
          than one python version and an other package with version specific
          dependencies on the package require it.  Provides are only for
          extensions, not modules.  Provides should only be rarely used for
          Python packages and never for Python 3.
        </p>
      </sect>

We could craft something similar for pypy provides.  Add them when needed, but 
mostly don't worry about  it.  Then you should be able to just use normal 
dependencies.  

Scott K


Reply to: