question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PyPy hard-codes the dlls and sos installed into a virtualenv

See original GitHub issue

What’s the problem this feature will solve? In the pypy-specific create/via_global_ref/builtin/pypy/common sources() function the super class calls cls._add_shared_libs(interpreter), which is implemented in each of [PyPy2, PyPy3] times [Windows, Posix]. In each of these 4 implementations, the class method explicitly lists the files it expects to find.

This is too restrictive and leads to churn when PyPy wants to change something.

Describe the solution you’d like CPython3Windows uses a more flexible cls.include_dll_and_pyd which uses Path.iterdir to find all the relevant files. I think on CPython, Posix symlink is always used, so the problem is avoided?

For an upcoming py3.9 I am toying with changing the dll name from libpypy3-c.dll to libpypy3.9-c.dll. Testing creating a virtualenv is failing. PRs #2218, #2141, #1103 would have been avoided if specific dll/so naming was avoided.

Alternative Solutions

I could just continue making PRs to add to the hard-coded list

Additional context

Thanks! If this seems like a desired direction I can open a PR

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gaborbernatcommented, Dec 29, 2021

That’s fine as long as you don’t mind me pinging you here in case is something out of my control 😆

1reaction
mattipcommented, Dec 29, 2021

Hmm. I would like to make PyPy as much like CPython as possible. CPython3Posix has no sources() method at all, and CPython3Windows has a shim launcher that PyPy does not have, but falls back to a “copy everything” wildcard if that shim is not found.

We now test that pip install virtualenv produces a working environment on our CI (a run with windows + pypy3.9, note how the steps after “Create virtualenv” fail which is how I knew something was off) so I am less worried about unknown incompatibilities like in the past.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Downloading and Installing PyPy
Downloading and Installing PyPy¶. Using a packaged PyPy¶. Some Linux distributions provide a pypy package. Note that in order to install additional modules...
Read more >
virtualenv 20.17.0 - PythonFix.com
/pkg/v/virtualenv/virtualenv-banner.webp ... PyPy hard-codes the dlls and sos installed into a virtualenv; The virtualenv.pyz zipapp cannot ...
Read more >
Release 20.13.4 unknown - Virtualenv
If you install everything into your host python (e.g. python3.8) it's ... add libffi-7.dll to the hard-coded list of dlls for PyPy (#2141)....
Read more >
Why doesn't virtualenv create DLLs folder? - Stack Overflow
When I created the patch to copy pythonXX.dll into virtualenv environment - I was solving a different problem: When Python is installed system- ......
Read more >
Untitled
... 0007-collect-installed-RPM-details-in-sosreport.patch ... tidy-issue341.patch tidy-issue379.patch 0001-configure-hardcode-the-ABI-for-wx-config.patch ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found