Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#57358 - [pycharm-community-edition] Python debugger extension asks for root permissions

Attached to Project: Community Packages
Opened by xsmile (xsmile) - Saturday, 03 February 2018, 22:49 GMT
Last edited by Maxime Gauduin (Alucryd) - Sunday, 04 February 2018, 13:28 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Maxime Gauduin (Alucryd)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
PyCharm supports setting up a speedup extension for debugging which is placed in $HOME/.PyCharm<VERSION>/system/cythonExtensions.
However, it seems that the home directory is not derived from the current user but is determined by the owner of the directory /usr/share/pycharm/helpers, resulting in PyCharm asking for root permissions to compile and install the extension.

Additional info:
* package version: 2017.3.3-1

Steps to reproduce:
- remove the directory $HOME/.PyCharmCE<VERSION>/system/cythonExtensions, if available
- run the debugger in an existing Python project
- click 'Install' in the 'Python Debugger Extension Available' popup
- PyCharm asks for root permissions

Workaround:
- as a non-root user, take ownership of the directory /usr/share/pycharm/helpers
- PyCharm will install the extension without root permissions
This task depends upon

Closed by  Maxime Gauduin (Alucryd)
Sunday, 04 February 2018, 13:28 GMT
Reason for closing:  Fixed
Additional comments about closing:  2017.3.3-2
Comment by xsmile (xsmile) - Sunday, 04 February 2018, 12:06 GMT Comment by xsmile (xsmile) - Sunday, 04 February 2018, 12:59 GMT
Possible fix, but it creates a few unnecessary __init__.py files in subdirectories of /usr/share/pycharm/helpers.

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -71,8 +71,10 @@ fi

package() {
# compile PyDev debugger used by PyCharm to speedup debugging
- python2 pycharm-$_pkgver/helpers/pydev/setup_cython.py build_ext --inplace
- python3 pycharm-$_pkgver/helpers/pydev/setup_cython.py build_ext --inplace
+ python2 pycharm-$_pkgver/helpers/pydev/setup_cython.py build_ext \
+ --build-temp build --build-lib .
+ python3 pycharm-$_pkgver/helpers/pydev/setup_cython.py build_ext \
+ --build-temp build --build-lib .

# base
install -dm 755 $pkgdir/opt/$pkgname
Comment by Maxime Gauduin (Alucryd) - Sunday, 04 February 2018, 13:27 GMT
That's a small price to pay, and yeah it looks like building the extensions did change. Just pushed 2017.3.3-2.

Loading...