Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 186919 - Review Request: eric: Python IDE
Summary: Review Request: eric: Python IDE
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Tibbitts
QA Contact: Fedora Package Reviews List
URL:
Whiteboard:
Depends On: 188496
Blocks: FE-ACCEPT
TreeView+ depends on / blocked
 
Reported: 2006-03-27 14:24 UTC by Rex Dieter
Modified: 2007-11-30 22:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-31 14:12:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Slightly hacked specfile which %ghosts .pyo files properly (5.99 KB, text/plain)
2006-06-28 01:43 UTC, Jason Tibbitts
no flags Details

Description Rex Dieter 2006-03-27 14:24:59 UTC
Spec Name or Url: http://apt.kde-redhat.org/apt/kde-redhat/SPECS/eric.spec
SRPM Name or Url: http://apt.kde-redhat.org/apt/kde-redhat/all/SRPMS.stable/eric-3.8.2-1.src.rpm
Description: 
eric3 is a full featured Python IDE that is written in PyQt using
the QScintilla editor widget.

Comment 1 Jochen Schmitt 2006-03-27 17:28:01 UTC
Can't get connection to above URL

Comment 2 Rex Dieter 2006-03-27 17:38:38 UTC
Trying using kde-redhat.unl.edu in place of apt.kde-redhat.org.  kde-redhat.org
seems to be inaccessible to some folks from .de for some reason.

Comment 3 Kevin Fenzi 2006-04-07 03:23:09 UTC
Not a full review (yet), but some major issues: 

- Seems to depend on PyQt-qscintilla, which as far as I can see isn't in 
extras or core. 

Failed build dependencies:
        PyQt-qscintilla is needed by eric-3.8.2-1.i386

- Uses the  %{?kde} macro. That sounds like something from the kde-redhat
project that isn't defined in fedora-extras. 

- Might check the spec against the macros and such from the extras python
package guidelines: 

http://fedoraproject.org/wiki/Packaging/Python



Comment 4 Rex Dieter 2006-04-07 04:10:47 UTC
Oops, looks like we'll be needing to submit PyQt-qscintilla too.  Sorry about that.

%{?kde} is harmless.  It evaluates to %{nil} if not defined (that's what the ?
is for)

The python bits work, and mesh pretty close with the existing guidelines.

Comment 5 Rex Dieter 2006-04-10 17:17:24 UTC
See PyQt-qscintilla submission, bug #188496

Comment 6 Rex Dieter 2006-04-10 17:21:51 UTC
%changelog
* Mon Apr 10 2006 Rex Dieter <rexdieter[AT]users.sf.net> 3.8.2-2
- cleanup/drop unused bits
- note PyQt-qscintilla submission

Spec Name or Url: http://kde-redhat.unl.edu/apt/kde-redhat/SPECS/eric-3.8.2-2.spec
SRPM Name or Url:
http://kde-redhat.unl.edu/apt/kde-redhat/all/SRPMS.stable/eric-3.8.2-2.src.rpm



Comment 7 Christian Nolte 2006-04-11 18:06:51 UTC
The build fails on my updated FC5 system with the following output:

...
processing /usr/lib/python2.4/site-packages/svn
  svn.ra                 : importing ... ok, processing ... ok, parsing ... ok
  svn.client             : importing ... ok, processing ...
Traceback (most recent call last):
  File "gen_python_api.py", line 288, in ?
    processFolder(folder)
  File "gen_python_api.py", line 223, in processFolder
    processFolder(folder + os.sep + entry, prefix=prefix+entry+'.')
  File "gen_python_api.py", line 244, in processFolder
    processModule(module, file)
  File "gen_python_api.py", line 152, in processModule
    processName(entryprefix, module + '.', name, ns)
  File "gen_python_api.py", line 93, in processName
    exec 'hasdoc = hasattr(' + moduleprefix + name + ', "__doc__")' in ns
  File "<string>", line 1
    hasdoc = hasattr(svn.client.import, "__doc__")
                                     ^
SyntaxError: invalid syntax
error: Bad exit status from /var/tmp/rpm-tmp.80127 (%build)
...

Could this be a dependency problem? Installing subversion-devel does not solve
this problem.

Comment 8 Rex Dieter 2006-04-11 18:12:40 UTC
What pkg(s) own /usr/lib/python2.4/site-packages/svn?

rpm -q -f /usr/lib/python2.4/site-packages/svn

I'd suggest trying to remove those, and build again.  PyQt (and eric) are
fragile, and it's best/easiest to build them in a clean(er) environment (like mock).

Comment 9 Christian Nolte 2006-04-12 14:10:09 UTC
> What pkg(s) own /usr/lib/python2.4/site-packages/svn?

subversion-1.3.1-2 owns this directory

> I'd suggest trying to remove those, and build again.  PyQt (and eric) are
> fragile, and it's best/easiest to build them in a clean(er) environment (like
> mock).

Your suggestion solves the build problem. Do you think this could be a
subversion related python-bug?

Comment 10 Christian Nolte 2006-04-12 14:15:35 UTC
I also did a quick rpmlint on your package:

E: eric no-binary
E: eric script-without-shellbang /usr/bin/gen_python_api.py
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/install-i18n.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/eric3-unittest.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/ThirdParty/brm/bike/parsing/fastparser.py
0644
E: eric non-executable-script /usr/lib/python2.4/site-packages/eric3/install.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/ThirdParty/brm/bike/logging.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/eric3-helpviewer.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/eric3-doc.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/eric3-uipreviewer.py 0644
E: eric non-executable-script /usr/lib/python2.4/site-packages/eric3/eric3.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/eric3-qregexp.py 0644
W: eric non-executable-in-bin /usr/bin/gen_sip_api.pyo 0644
W: eric non-executable-in-bin /usr/bin/gen_sip_api.pyc 0644
E: eric non-executable-script /usr/lib/python2.4/site-packages/eric3/eric3-re.py
0644
W: eric non-executable-in-bin /usr/bin/gen_python_api.pyo 0644
W: eric non-executable-in-bin /usr/bin/gen_python_api.pyc 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/Examples/rhallo.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/DebugClients/Python/PyCoverage.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/Examples/hallo.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/eric3-trpreviewer.py 0644
E: eric non-executable-script
/usr/lib/python2.4/site-packages/eric3/eric3-api.py 0644

rpmlint -i will tell you more details on how to solve these problems.


Comment 11 Rex Dieter 2006-05-01 17:29:29 UTC
Those are all(most?) harmless rpmlint warnings.  python scripts (*.py files)
don't have to be executable.  

It appears fc5+ (auto)generates .pyo files... I wonder if there's anything
special that needs to be done packaging-wise?

Comment 12 Rex Dieter 2006-05-01 17:30:33 UTC
%changelog
* Mon May 1 2006 Rex Dieter <rexdieter[AT]users.sf.net> 3.9.0-1
- 3.9.0
- create/own %%{_datadir}/eric, for .api files
- generate .api files for python, PyQt
- %%triggerin PyQt4/PyKDE to (auto)generate .api files

Spec Name or Url: http://kde-redhat.unl.edu/apt/kde-redhat/SPECS/eric-3.9.0-1.spec
SRPM Name or Url:
http://kde-redhat.unl.edu/apt/kde-redhat/all/SRPMS.stable/eric-3.9.0-1.src.rpm

Comment 13 Chien-Chung Yeh 2006-05-11 19:32:13 UTC
In Fedora Core 5, install package "eric-3.9.0-1.fc4.i386.rpm":

$ eric3
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/eric3/eric3.py", line 32, in ?
    from UI.E3SingleApplication import E3SingleApplicationClient
  File "/usr/lib/python2.4/site-packages/eric3/UI/E3SingleApplication.py", 
line 15, in ?
    from Utilities.SingleApplication import SingleApplicationClient, 
SingleApplicationServer
  File "/usr/lib/python2.4/site-packages/eric3/Utilities/__init__.py", line 
22, in ?
    import Preferences
  File "/usr/lib/python2.4/site-packages/eric3/Preferences/__init__.py", line 
29, in ?
    class Prefs:
  File "/usr/lib/python2.4/site-packages/eric3/Preferences/__init__.py", line 
197, in Prefs
    editorAPIDefaults = {
NameError: name 'pyApiList' is not defined

In order to work around this, patch it with:

--- /usr/lib/python2.4/site-packages/eric3/Preferences/__init__.py.00   
2006-05-02 01:38:16.000000000 +0800
+++ /usr/lib/python2.4/site-packages/eric3/Preferences/__init__.py      
2006-05-12 03:32:04.000000000 +0800
@@ -194,6 +194,8 @@ class Prefs:
         "MonospacedFont" : "monospace,12,-1,5,50,0,0,0,0,0"
     }

+    # Fix eric3 initial problem "NameError: name 'pyApiList' is not defined"
+    pyApiList = QStringList()
     editorAPIDefaults = {
         "Python" : pyApiList,
         "C++" : QStringList(),
@@ -203,7 +205,6 @@ class Prefs:
         "JavaScript" : QStringList()
     }

-    pyApiList = QStringList()
     #for file in ["python"]:
     for file in ["python", "qt", "qttext", "qtcanvas", "qtgl", "qtnetwork", 
"qtsql", "qttable", "qtui", "qtxml"]:
         pyApiList.append(QString("/usr/share/eric@/%s.api" % file))

Then it works in FC5.

Comment 14 Rex Dieter 2006-05-11 20:06:29 UTC
Thanks.

* Thu May 11 2006 Rex Dieter <rexdieter[AT]users.sf.net> 3.9.0-2
- merge -fonts,-api patches into -prefs patch, make it work on
  fc5/python24 too

Spec Name or Url: http://kde-redhat.unl.edu/apt/kde-redhat/SPECS/eric-3.9.0-2.spec
SRPM Name or Url:
http://kde-redhat.unl.edu/apt/kde-redhat/all/SRPMS.stable/eric-3.9.0-2.src.rpm

Comment 15 Rex Dieter 2006-06-19 14:47:46 UTC
FYI, PyQt-qscintilla has been pushed to Extras for FC-5 and FC-6/devel branches.

Comment 16 Jason Tibbitts 2006-06-19 20:18:53 UTC
I was looking at this but got distracted.  I'll try to get back to it, but of
course anyone else is welcome to take a look first.

Comment 17 Jason Tibbitts 2006-06-21 17:33:45 UTC
OK, this builds in mock on x86_64, development.  First thing I see is an empty
debuginfo package, because this is an arch-dependent package that doesn't seem
to have any binaries.  Can this truly not be noarch?  

There's also this:
E: eric no-binary

The a whole pile of
E: eric non-executable-script /usr/lib64/python2.4/site-packages/eric3/eric3.py 0644
which are caused by these modules erroneously all starting with a shebang line.
 In the past folks have just removed such lines.

Then there are a few of these:
W: eric non-executable-in-bin /usr/bin/gen_sip_api.pyo 0644
W: eric non-executable-in-bin /usr/bin/gen_sip_api.pyc 0644
W: eric non-executable-in-bin /usr/bin/gen_python_api.pyo 0644
W: eric non-executable-in-bin /usr/bin/gen_python_api.pyc 0644

RPM will compile and optimize every single .py file it finds, even in bindir,
which is obviously a bug but it seems isn't going to be fixed.  I suggest either
deleting these files or %exclude'ing them, preferably the former in case rpm
gets fixed to stop generating these in the future.

Also, this rpm behavior means that you will get .pyo files everywhere even if
you don't ask for it, so you'll need to %ghost them all.  Unfortunately this
considerably complicates the %files list.

Comment 18 Rex Dieter 2006-06-21 17:49:58 UTC
Why not just keep the .pyo/.pyc files and keep it arch-specific (and tell
rpmlint to go to f*&* itself)?  (:

Comment 19 Jason Tibbitts 2006-06-28 01:42:15 UTC
That would indeed be convenient, as fighting with rpm's stupidity is incredibly
annoying, but that's the way it goes.  I did a bit of work and came up with
something that at least fixes the .pyo files.  I'll attach the spec, but it's
not really complete.  I had to use %{buildroot} in one place because I couldn't
get $RPM_BUILD_ROOT to expand properly, which would require the other uses to
change over as well.

Anyway, maybe it will help you.

Comment 20 Jason Tibbitts 2006-06-28 01:43:26 UTC
Created attachment 131640 [details]
Slightly hacked specfile which %ghosts .pyo files properly

Comment 21 Rex Dieter 2006-07-13 14:28:20 UTC
Thanks for the tips, Jason.

Spec Name or Url: http://kde-redhat.unl.edu/apt/kde-redhat/SPECS/eric-3.9.0-3.spec
SRPM Name or Url:
http://kde-redhat.unl.edu/apt/kde-redhat/all/SRPMS.stable/eric-3.9.0-3.src.rpm

%changelog
* Wed Jul 12 2006 Rex Dieter <rexdieter[AT]users.sf.net> 3.9.0-3
- %%ghost .pyo files



Comment 22 Jason Tibbitts 2006-07-18 20:30:55 UTC
This failed to build for me in a rather odd way:

+ find /var/tmp/eric-3.9.0-3.fc6-root-mockbuild/usr/lib/python2.4/site-packages
-not -type d -name '*.pyo'
+ sed 's:/var/tmp/eric-3.9.0-3.fc6-root-mockbuild\(.*\):%ghost \1:'
+ '%{_python_sitedir}/eric3config.pyo'
/var/tmp/rpm-tmp.51706: line 76: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.51706 (%install)

Perhaps remove the underscore from %{_python_sitedir}?  I tried, and the build
failed with:

+ /usr/lib/python2.4/site-packages/eric3config.pyo
/var/tmp/rpm-tmp.74633: line 76:
/usr/lib/python2.4/site-packages/eric3config.pyo: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.74633 (%install)

I changed those two lines in the %if "%{?fedora}" > "4" bit to echo the
filenames into the files.list and things do build, but I don't think that's what
you intended.  Did you want to %ghost those two files?

Comment 23 Rex Dieter 2006-07-19 14:56:40 UTC
Not sure how/why it built previously fine for me in a fc5 buildroot. ???


Spec Name or Url: http://kde-redhat.unl.edu/apt/kde-redhat/SPECS/eric.spec
SRPM Name or Url:
http://kde-redhat.unl.edu/apt/kde-redhat/all/SRPMS.stable/eric-3.9.0-4.src.rpm

%changelog
* Wed Jul 19 2006 Rex Dieter <rexdieter[AT]users.sf.net> 3.9.0-4
- fix fedora > 4 %%ghost'ing case.

Comment 24 Rex Dieter 2006-07-19 14:59:45 UTC
> Did you want to %ghost those two files?
For the record, yes. (:

Comment 25 Jason Tibbitts 2006-07-19 20:36:30 UTC
Did you decide what to do about the non-executable-script errors that rpmlint is
throwing?  As far as I can see, all of them are OK except for
/usr/lib/python2.4/site-packages/eric3/ThirdParty/brm/bike/parsing/fastparser.py.

Comment 26 Rex Dieter 2006-07-20 11:19:43 UTC
> Did you decide what to do about the non-executable-script errors

As there's only 1 real problematic one (fastparser.py), I'll just patch that.

Comment 27 Rex Dieter 2006-07-26 14:03:00 UTC
Spec Name or Url: http://kde-redhat.unl.edu/apt/kde-redhat/SPECS/eric.spec
SRPM Name or Url:
http://kde-redhat.unl.edu/apt/kde-redhat/all/SRPMS.stable/eric-3.9.0-5.src.rpm

%changelog
* Wed Jul 26 2006 Rex Dieter <rexdieter[AT]users.sf.net> 3.9.0-5
- make fastparser.py eXecutable
- s/$RPM_BUILD_ROOT/%%buildroot/


Comment 28 Jason Tibbitts 2006-07-27 04:04:01 UTC
Everything's looking good now.  Did you see the fix to gen_sip_api.py that came
out July 11?

You can probably remove the comment with the link to the PyQt-qscintilla review.

I'm not sure about this; does PYTHONOPTIMIZE do the opposite of what I think it
does?

# generate .pyo files?  No, for now, it's fast enough as-is.  -- Rex
PYTHONOPTIMIZE=1; export PYTHONOPTIMIZE

rpmlint is complaining about spaces and tabs:
  W: eric mixed-use-of-spaces-and-tabs
Seems to be on the Name, Group, URL and Source lines.  Not an essential fix IMO,
but should be simple to fix.

* source files match upstream:
   2d2c4f85787b34671c76dea1436da8ae  eric-3.9.0.tar.gz
   fcea430a92e9d88089d91ce3099db282  gen_python_api_20050605.tar.gz
* package meets naming and packaging guidelines.
* specfile is properly named, is cleanly written and uses macros consistently.
* dist tag is present.
* build root is correct.
* license field matches the actual license.
* license is open source-compatible.  License text included in package.
* latest version is being packaged.
* BuildRequires are proper.
* %clean is present.
* package builds in mock (development, x86_64).
* noarch package; no debuginfo.
X rpmlint complains about mixed spaces and tabs, plus some ignorable warnings.
* final provides and requires are sane:
   eric = 3.9.0-5.fc6
  =
   /bin/sh
   /usr/bin/env
   PyQt = 3.16
   PyQt-qscintilla
   python(abi) = 2.4
   python-abi = 2.4
* %check is not present; no test suite upstream.
* no shared libraries are present.
* package is not relocatable.
* owns the directories it creates.
* doesn't own any directories it shouldn't.
* no duplicates in %files.
* file permissions are appropriate.
* no scriptlets present.
* code, not content.
* documentation is small, so no -docs subpackage is necessary.
* %docs are not necessary for the proper functioning of the package.
* no headers.
* no pkgconfig files.
* no libtool .la droppings.
* not a GUI app.

APPROVED

Comment 29 Rex Dieter 2006-07-27 11:41:00 UTC
> I'm not sure about this; does PYTHONOPTIMIZE do the opposite of what I think 
> it does?

I'm not so sure anymore, and I never intended to leave that line active 
(uncommented).  I *think* eric doesn't actually use it one way or the other.

Comment 30 Rex Dieter 2006-07-27 11:43:03 UTC
> Did you see the fix to gen_sip_api.py that came out July 11?

No, I look into that.

Comment 31 Rex Dieter 2006-07-27 14:57:08 UTC
Arg... build is failing on the buildsys... I'm guessing due to an unstable ppc
buildhost).  python is crashing with "illegal instruction".

--------------------------------------------------
Job failed on arch noarch


         Build logs may be found at
http://buildsys.fedoraproject.org/logs/fedora-development-extras/13203-eric-3.9.1-2.fc6/


-------------------------------------------------

  _curses                : importing ... modulename begins with _
  _bsddb                 : importing ... modulename begins with _
  dl                     : importing ... ok, processing ... ok, no source file
  resource               : importing ... ok, processing ... ok, no source file
  _codecs_cn             : importing ... modulename begins with _
  _weakref               : importing ... modulename begins with _
  cStringIO              : importing ... ok, processing ... ok, no source file
  rgbimg                 : importing ... ok, processing ... ok, no source file
  select                 : importing ... ok, processing ... ok, no source file
  _heapq                 : importing ... modulename begins with _
  crypt                  : importing ... ok, processing ... ok, no source file
  _csv                   : importing ... modulename begins with _
  syslog                 : importing ... ok, processing ... ok, no source file
  _locale                : importing ... modulename begins with _
  math                   : importing ... ok, processing ... ok, no source file
  regex                  : importing ... ok, processing ... ok, no source file
  _testcapi              : importing ... modulename begins with _
  mmap                   : importing ... ok, processing ... ok, no source file
  shm                    : importing ... ok, processing ... ok, no source file
  cPickle                : importing ... ok, processing ... ok, no source file
  itertools              : importing ... ok, processing ... ok, no source file
  gdbm                   : importing ... ok, processing ... ok, no source file
  binascii               : importing ... ok, processing ... ok, no source file
  md5                    : importing ... ok, processing ... ok, no source file
  _multibyt/var/tmp/rpm-tmp.26157: line 53: 11891 Illegal instruction    
/usr/bin/python gen_python_api.py
/var/tmp/eric-3.9.1-2.fc6-root-mockbuild/usr/share/eric/
error: Bad exit status from /var/tmp/rpm-tmp.26157 (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.26157 (%install)

Comment 32 Rex Dieter 2006-07-27 14:58:15 UTC
For the record, it builds fine for me in mock for fc6 on an i386 buildhost.

Comment 33 Rex Dieter 2006-07-31 14:12:12 UTC
OK, problems went away after ppc buildhosts were upgraded fc3->fc5


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