conda-forge / pypy3.6-feedstock

A conda-smithy repository for pypy3.6.
BSD 3-Clause "New" or "Revised" License
4 stars 13 forks source link

Path in TkApp is wrong #80

Closed mattip closed 2 years ago

mattip commented 2 years ago

Solution to issue cannot be found in the documentation.

Issue

The pillow-feedstock is failing tests. @isuruf noted that the path mangling is wrong.

With the new file layout, https://foss.heptapod.net/pypy/pypy/-/blob/branch/py3.8/lib_pypy/_tkinter/app.py#L47 seems to need an extra dirname

Not only that, the subdirectories are tcl8.6 and tk8.6, not the bare tcl and tk . I wonder how CPython deals with this?

Installed packages

conda create -n pypy38 pypy python=3.8

Environment info

$ conda info

     active environment : pypy38
    active env location : /home/matti/miniconda3/envs/pypy38
            shell level : 2
       user config file : /home/matti/.condarc
 populated config files : /home/matti/.condarc
          conda version : 4.10.3
    conda-build version : not installed
         python version : 3.9.7.final.0
       virtual packages : __cuda=11.2=0
                          __linux=5.4.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/matti/miniconda3  (writable)
      conda av data dir : /home/matti/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/pytorch/linux-64
                          https://conda.anaconda.org/pytorch/noarch
          package cache : /home/matti/miniconda3/pkgs
                          /home/matti/.conda/pkgs
       envs directories : /home/matti/miniconda3/envs
                          /home/matti/.conda/envs
               platform : linux-64
             user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.7 Linux/5.4.0-107-generic ubuntu/20.04.4 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
h-vetinari commented 2 years ago

AFAICS, upstream has been using the versioned tcl's for a while (stopped going back further than this commit from 3.7 for changing from 8.5 to 8.6, and this one from 3.3). PyPy already does so for windows:

    if sys.platform == 'win32':
        lib_path = join(dirname(dirname(dirname(__file__))), 'tcl')
        tcl_path = join(lib_path, 'tcl8.6')
        tk_path = join(lib_path, 'tk8.6')
        tcl_path = tcl_path.replace(sep, '/')
        tk_path = tk_path.replace(sep, '/')
    else:
        lib_path = join(dirname(dirname(dirname(__file__))), 'lib')
        tcl_path = join(lib_path, 'tcl')
        tk_path = join(lib_path, 'tk')

Is it conceivable that this just happened to work previously on unix more or less by chance?