-
-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External Packages with data_files
are not correctly working (eg. with pydevd-pycharm
)
#2152
Comments
I've taken an initial look at this - and... wow Pycharm's debugger package is a hot mess. They're distributing a package that has binary components... as a Ok; so that's just some extra binaries that don't need to exist. Why is that a problem? Well, on macOS, if those binaries are in an app, and they look like libraries, they need to be signed for the app to be able to run. Linux binaries have headers that make them look like valid macOS binaries, so macOS needs to be able to sign them - but they're not macOS binaries, so macOS signing tooling is unable to sign them. It won't be possible to install the package at all on iOS. You can't use setup.py Extension compiler tooling on iOS, because the installation target (the iOS device) doesn't have a compiler. Because of this, iOS requires the use of wheels for distribution of binary content. Your comment on #2147 suggests this works on Android... and frankly, I'm amazed. It should be choking on compile the extensions as well. If it's getting through somehow (and based on a quick read of the code, I'm not sure how), it's because Python 3.12 reports With all that said - I can confirm I see the same underlying behavior on macOS as you're reporting on Windows - the Finding the To me, this is looking very much like a PyCharm issue. If they packaged their binary package as a binary package, I imagine this would work a whole lot better - and it would be a lot smaller to boot. |
Doesn't it delete the directory and start from scratch every time? |
... of course it does. 🤦 Ok, maybe it is a viable solution then. |
Describe the bug
To debug a packaged application with PyCharm, the package
pydevd-pycharm
must be used. I can use it viabriefcase dev
without any problems. However, when I runbriefcase run
I get the following error:If you compare the
_pydevd_bundle
folder of the virtual environment (.venv\Lib\site-packages\_pydevd_bundle
) used bybriefcase dev
with the one from the packaged application (build\helloworld\windows\app\src\app_packages\_pydevd_bundle
) used bybriefcase run
, you can see that many.py
files are missing in the packaged application. There is only the data in the packaged application that is available in the virtual environment under (.venv\_pydevd_bundle
), which is only thedata_files
.This is due to a bug in the combination of the pip parameters
--target=
in combination with--upgrade
, which are used here by briefcase. There is already a ticket in the pip repo for this.I have temporary removed
--upgrade
at the position in briefcase and then it works as desired. Maybe it is a possibility to remove the--upgrade
option from briefcase completely?Steps to reproduce
pydevd-pycharm~=243.23654.177
torequires
inpyproject.toml
briefcase run
Expected behavior
Importing
pydevd_pycharm
should work.Screenshots
No response
Environment
Logs
Additional context
No response
The text was updated successfully, but these errors were encountered: