Bug 186919
| Summary: | Review Request: eric: Python IDE | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Rex Dieter <rdieter> | ||||
| Component: | Package Review | Assignee: | Jason Tibbitts <j> | ||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Package Reviews List <fedora-package-review> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | rawhide | CC: | ch.nolte, gauret, j, matthias.kloth | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2006-07-31 14:12:12 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | 188496 | ||||||
| Bug Blocks: | 163779 | ||||||
| Attachments: |
|
||||||
|
Description
Rex Dieter
2006-03-27 14:24:59 UTC
Can't get connection to above URL 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. 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
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.
See PyQt-qscintilla submission, bug #188496 %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 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.
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). > 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? 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. 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? %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
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.
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 FYI, PyQt-qscintilla has been pushed to Extras for FC-5 and FC-6/devel branches. 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. 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. Why not just keep the .pyo/.pyc files and keep it arch-specific (and tell rpmlint to go to f*&* itself)? (: 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.
Created attachment 131640 [details]
Slightly hacked specfile which %ghosts .pyo files properly
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 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?
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. > Did you want to %ghost those two files?
For the record, yes. (:
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. > 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.
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/ 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 > 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.
> Did you see the fix to gen_sip_api.py that came out July 11?
No, I look into that.
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)
For the record, it builds fine for me in mock for fc6 on an i386 buildhost. OK, problems went away after ppc buildhosts were upgraded fc3->fc5 |