FS#67159 - [pycharm-community-edition] Building Cython extension in the packages breaks new Cython extension

Attached to Project: Community Packages
Opened by EFanZh (EFanZh) - Wednesday, 01 July 2020, 05:11 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 09 May 2023, 21:54 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Leonidas Spyropoulos (inglor)
Levente Polyak (anthraxx)
Orhun Parmaksız (orhun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



Currently, the PKGBUILD builds Cython extension for Python 2 and Python 3 in the package. This could break installing new Cython extension for other Python versions.

Steps to reproduce:

1. Install pycharm-community-edition.
2. Install python37 from AUR (https://aur.archlinux.org/packages/python37).
3. Create a project using Python 3.7 as interpreter.
4. Start debugging.
5. A warning message will show, saying “Python Debugger Extension Available”. Click “Install” and wait for completion.
6. Start debugging again. Now the warning message will show again, which is not expected, since I have just installed it.

Here is my analysis:

The built-in Cython extension is installed at the following paths:


And the “Install” link from the warning message will install the extensions at the following paths:


It seems that PyCharm will not try the user paths if the system paths exists. So the warning messages keep showing up. After deleting the extension on system paths, the Cython extensions on user paths are loaded correctly.

Maybe this could be solved on PyCharm side. But the most simple method to solve this is to not build Cython extensions in the package and having users build them using “Install” link from the warning message.
This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 09 May 2023, 21:54 GMT
Reason for closing:  None
Additional comments about closing:  Seems fixed these days. See comments.
Comment by Levente Polyak (anthraxx) - Wednesday, 01 July 2020, 23:01 GMT
This should really be fixed on PyCharm side, there is no reason why the ~/.cache shouldn't be traversed as well even if the system path exists.
If i see it correctly the 'install' knob will just side load stuff into your home so I prefer to not side load the regular latest supported variants we offer in the official repos
Comment by EFanZh (EFanZh) - Thursday, 02 July 2020, 10:23 GMT
Unfortunately PyCharm won’t fix it on their side: https://youtrack.jetbrains.com/issue/PY-43245.

But I might have another solution:

Build the Cython using `--inplace` instead of `--build-temp` and `--build-lib`, then the Cython extension will be generated at `_pydevd_bundle` and `_pydevd_frame_eval` directories instead of `*_ext` directories. Since the names are different than the directory names in user paths, the user Cpython extensions will not be affected.
Comment by Toolybird (Toolybird) - Monday, 01 May 2023, 00:51 GMT
Is this still an issue with latest pkgs?
Comment by EFanZh (EFanZh) - Tuesday, 09 May 2023, 10:42 GMT
The latest package does not seem to have the issue anymore.