Bug 1309112 - DebugClient for python 2 eviscerated from distribution
Summary: DebugClient for python 2 eviscerated from distribution
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: eric
Version: 23
Hardware: All
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-16 22:02 UTC by Bruno A. Crespo
Modified: 2016-02-29 22:23 UTC (History)
2 users (show)

Fixed In Version: eric-6.1.2-2.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-29 22:23:11 UTC


Attachments (Terms of Use)
Patch for installing python2 debug client in python2_sitelib instead of python3_sitelib (4.39 KB, patch)
2016-02-17 00:13 UTC, Bruno A. Crespo
no flags Details | Diff
New spec file that use the patched install (15.06 KB, text/plain)
2016-02-17 00:14 UTC, Bruno A. Crespo
no flags Details

Description Bruno A. Crespo 2016-02-16 22:02:20 UTC
When you try to debug or simply run a python2 project you get this error:

/usr/bin/python2.7: can't open file '/usr/lib/python3.4/site-packages/eric6/DebugClients/Python/DebugClient.py': [Errno 2] No such file or directory

After investigating the .spec file you find this pearl:

# FIXME: find way to byte-compile this with python2 instead
rm -rfv %{buildroot}%{python3_sitelib}/eric6/DebugClients/Python/


Why, oh why, in the name of God did you eviscerated the python 2 support from the package? It's simply a problem of moving the DebugClient module to the python 2 lib.... or simply leave it alone...Do you know that the main python interpreter in Fedora still is python 2? Do you know that if you develop for Redhat EL you probably need to user python 2? Why did you make this to the best tool for python programming? why?

Comment 1 Rex Dieter 2016-02-16 22:17:55 UTC
why?  because the build failed otherwise, since it seems to be able to byte-compile for python2 or python3.

I could try again, and see what happens.

Comment 2 Rex Dieter 2016-02-16 22:26:34 UTC
Excellent, seems rpm no longer fails in this case, I'll send out an update soon.

Comment 3 Rex Dieter 2016-02-16 23:09:58 UTC
Hrm, local build succeeds, koji build fails,

+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
Bytecompiling .py files below /builddir/build/BUILDROOT/eric-6.1.2-1.fc24.noarch/usr/lib/python3.5 using /usr/bin/python3.5
*** Error compiling '/builddir/build/BUILDROOT/eric-6.1.2-1.fc24.noarch/usr/lib/python3.5/site-packages/eric6/DebugClients/Python/DebugBase.py'...
  File "/usr/lib/python3.5/DebugBase.py", line 251
    print 'DebugBase.trace_dispatch: unknown debugging event:', repr(event)
                                                             ^
SyntaxError: invalid syntax
*** Error compiling '/builddir/build/BUILDROOT/eric-6.1.2-1.fc24.noarch/usr/lib/python3.5/site-packages/eric6/DebugClients/Python/DebugClientBase.py'...
  File "/usr/lib/python3.5/DebugClientBase.py", line 808
    exec code in _globals, _locals
            ^
SyntaxError: Missing parentheses in call to 'exec'
error: Bad exit status from /var/tmp/rpm-tmp.BygFy9 (%install)

Comment 4 Bruno A. Crespo 2016-02-17 00:13:31 UTC
Created attachment 1127752 [details]
Patch for installing python2 debug client in python2_sitelib instead of python3_sitelib

This patch modify install.py for installing the python2 debug client in python2 sitelib and adds a config option to eric2config.py with this location.

The debugger interface is also modified to get the debug client in the new location.

Comment 5 Bruno A. Crespo 2016-02-17 00:14:52 UTC
Created attachment 1127755 [details]
New spec file that use the patched install

This modified spec file use the patched install

Comment 6 Bruno A. Crespo 2016-02-17 00:16:55 UTC
With the patch and the new spec file I could build and install eric with support for python2.

Is a crude hack but it works.  I think that the change in eric code is not appropiate for upstream use (very Fedora/Redhat specific).

Comment 7 Rex Dieter 2016-02-18 18:43:16 UTC
Thanks.  I've adapted the patch to latest eric-6.1.2, and after I fight off a few other build-related issue, should have something for you to test shortly

Comment 8 Fedora Update System 2016-02-18 18:59:31 UTC
eric-6.1.2-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9accb99249

Comment 9 Fedora Update System 2016-02-21 17:59:37 UTC
eric-6.1.2-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9accb99249

Comment 10 Bruno A. Crespo 2016-02-23 17:52:25 UTC
It works for me now.  Please push to update repo.

Comment 11 Rex Dieter 2016-02-23 18:01:50 UTC
Excellent, will do so as soon as possible

Thanks for testing and your help here, very much appreciated.

Comment 12 Fedora Update System 2016-02-29 22:23:08 UTC
eric-6.1.2-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.