Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#9107 closed defect (fixed)

Error when building the egg file

Reported by: anonymous Owned by: hasienda
Priority: high Component: AccountManagerPlugin
Severity: blocker Keywords: compatibility python2.4
Cc: guillaume.royer@… Trac Release: 0.12

Description

I've doanloaded the source code and unzipped it. After running

python setup.py bdist_egg

I get the following output:

running bdist_egg
running egg_info
creating TracAccountManager.egg-info
writing requirements to TracAccountManager.egg-info/requires.txt
writing TracAccountManager.egg-info/PKG-INFO
writing top-level names to TracAccountManager.egg-info/top_level.txt
writing dependency_links to TracAccountManager.egg-info/dependency_links.txt
writing entry points to TracAccountManager.egg-info/entry_points.txt
writing manifest file 'TracAccountManager.egg-info/SOURCES.txt'
reading manifest file 'TracAccountManager.egg-info/SOURCES.txt'
writing manifest file 'TracAccountManager.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/acct_mgr
copying acct_mgr/hashlib_compat.py -> build/lib/acct_mgr
copying acct_mgr/admin.py -> build/lib/acct_mgr
copying acct_mgr/db.py -> build/lib/acct_mgr
copying acct_mgr/htfile.py -> build/lib/acct_mgr
copying acct_mgr/http.py -> build/lib/acct_mgr
copying acct_mgr/md5crypt.py -> build/lib/acct_mgr
copying acct_mgr/api.py -> build/lib/acct_mgr
copying acct_mgr/util.py -> build/lib/acct_mgr
copying acct_mgr/guard.py -> build/lib/acct_mgr
copying acct_mgr/svnserve.py -> build/lib/acct_mgr
copying acct_mgr/web_ui.py -> build/lib/acct_mgr
copying acct_mgr/__init__.py -> build/lib/acct_mgr
copying acct_mgr/notification.py -> build/lib/acct_mgr
copying acct_mgr/pwhash.py -> build/lib/acct_mgr
creating build/lib/acct_mgr/htdocs
copying acct_mgr/htdocs/locked.png -> build/lib/acct_mgr/htdocs
copying acct_mgr/htdocs/time-locked.png -> build/lib/acct_mgr/htdocs
copying acct_mgr/htdocs/acct_mgr.css -> build/lib/acct_mgr/htdocs
creating build/lib/acct_mgr/locale
copying acct_mgr/locale/.placeholder -> build/lib/acct_mgr/locale
creating build/lib/acct_mgr/templates
copying acct_mgr/templates/verify_email.html -> build/lib/acct_mgr/templates
copying acct_mgr/templates/admin_accountsconfig.html -> build/lib/acct_mgr/templates
copying acct_mgr/templates/admin_users.html -> build/lib/acct_mgr/templates
copying acct_mgr/templates/reset_password.html -> build/lib/acct_mgr/templates
copying acct_mgr/templates/account_details.html -> build/lib/acct_mgr/templates
copying acct_mgr/templates/prefs_account.html -> build/lib/acct_mgr/templates
copying acct_mgr/templates/admin_accountsnotification.html -> build/lib/acct_mgr/templates
copying acct_mgr/templates/login.html -> build/lib/acct_mgr/templates
copying acct_mgr/templates/db_cleanup.html -> build/lib/acct_mgr/templates
copying acct_mgr/templates/register.html -> build/lib/acct_mgr/templates
copying acct_mgr/templates/reset_password_email.txt -> build/lib/acct_mgr/templates
copying acct_mgr/templates/user_changes_email.txt -> build/lib/acct_mgr/templates
copying acct_mgr/templates/verify_email.txt -> build/lib/acct_mgr/templates
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/acct_mgr
creating build/bdist.linux-x86_64/egg/acct_mgr/htdocs
copying build/lib/acct_mgr/htdocs/locked.png -> build/bdist.linux-x86_64/egg/acct_mgr/htdocs
copying build/lib/acct_mgr/htdocs/time-locked.png -> build/bdist.linux-x86_64/egg/acct_mgr/htdocs
copying build/lib/acct_mgr/htdocs/acct_mgr.css -> build/bdist.linux-x86_64/egg/acct_mgr/htdocs
copying build/lib/acct_mgr/hashlib_compat.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/admin.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/db.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/htfile.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/http.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/md5crypt.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/api.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/util.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/guard.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/svnserve.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/web_ui.py -> build/bdist.linux-x86_64/egg/acct_mgr
creating build/bdist.linux-x86_64/egg/acct_mgr/locale
copying build/lib/acct_mgr/locale/.placeholder -> build/bdist.linux-x86_64/egg/acct_mgr/locale
copying build/lib/acct_mgr/__init__.py -> build/bdist.linux-x86_64/egg/acct_mgr
creating build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/verify_email.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/admin_accountsconfig.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/reset_password_email.txt -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/admin_users.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/reset_password.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/user_changes_email.txt -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/account_details.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/prefs_account.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/admin_accountsnotification.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/login.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/verify_email.txt -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/db_cleanup.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/register.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/notification.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/pwhash.py -> build/bdist.linux-x86_64/egg/acct_mgr
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/hashlib_compat.py to hashlib_compat.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/admin.py to admin.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/db.py to db.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/htfile.py to htfile.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/http.py to http.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/md5crypt.py to md5crypt.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/api.py to api.pyc
  File "build/bdist.linux-x86_64/egg/acct_mgr/api.py", line 37
    string = singular if num == 1 else plural
                       ^
SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/util.py to util.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/guard.py to guard.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/svnserve.py to svnserve.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py to web_ui.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/notification.py to notification.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/pwhash.py to pwhash.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
creating dist
creating 'dist/TracAccountManager-0.4dev-py2.4.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)

As you can see there is an error in there. I tried to go ahead and put the plugin under the plugins folder, restart but I don't see the plugin in the Admin section. I had UserManagerPlugin before that works, wanted to try this one but cannot even build it.

Attachments (0)

Change History (7)

comment:1 Changed 3 years ago by hasienda

(In [10610]) AccountManagerPlugin: Rewrite i18n function to restore Python2.4 compliance, refs #9107.

Ironically this code has been borrowed from Trac for backwards-compatibility
with Trac0.11, but Trac trunk dropped Python2.4 support after the Trac0.12
release. My fault, not to notice, but others didn't as well - since [10422].

comment:2 Changed 3 years ago by hasienda

  • Keywords compatibility python2.4 added
  • Priority changed from highest to high
  • Status changed from new to assigned

I wonder, why this went undiscovered even for a month, since I know of a number of Python2.4 users.

Thanks for reporting this. You made the difference. I'll release this as part of acct_mgr-3.2 and keep this open as a reminder until then. I'd still like to get your feedback, if you can confirm, that it works for you now. I'm already at Python 2.5, won't test any longer with older ones.

BTW, keep your voice a little lower regarding bug rating as long as you do provide that few information: no AcctMgr version, no Trac revision, no Python version (well, I see it from the SyntaxError, anyway). Please give us a little more next time, ok?

comment:3 follow-up: Changed 3 years ago by guillaume

oh yeah sorry about the missing versions, will think about it next time :-)

well otherwise, what do I have to do? I didn't really get it, and I never coded in Python so won't be able to just rewrite the function to fix the bug ... thanks for your help

comment:4 in reply to: ↑ 3 Changed 3 years ago by hasienda

Replying to guillaume:

oh yeah sorry about the missing versions, will think about it next time :-)

Thanks.

well otherwise, what do I have to do? I didn't really get it, and I never coded in Python so won't be able to just rewrite the function to fix the bug

Oh, most probably you could. Just open acct_mgr/api.py in you downloaded source code, change the line (no. 34) as shown in [10610] and try to build the egg again.

... thanks for your help

You're welcome. There are at least three options for now:

  1. Enjoy the changeset (link above) - no, joke - forget this one
  2. Check-out current trunk code, if you can cope with some incompatible options (already renamed for acct_mgr-0.4)
  3. Wait for acct_mgr-0.3.2 to come out soon with the fix merged back to current stable

comment:5 follow-up: Changed 3 years ago by anonymous

  • Resolution set to fixed
  • Status changed from assigned to closed

Thanks guys it worked! Modified the file, build the egg again, easy_install failed but copying the egg file worked. All good

comment:6 in reply to: ↑ 5 Changed 3 years ago by hasienda

Replying to anonymous:

Thanks guys it worked!

Ok, looks like a "GO" to me. :-)

So it's about time to prepare the next maintenance release...

comment:7 Changed 3 years ago by hasienda

(In [10618]) AccountManagerPlugin: Publish maintenance release 0.3.2, closes #9051, #9082, #9088, #9091, #9092, #9093, #9095, #9099, #9107, #9108 and #9109.

This is an update for current stable at 0.3.1 with a number of fixes
for issues reported within the last weeks.

While they will go into acct_mgr-0.4 too, current code isn't ready for release
yet and will introduce a number of backwards-incompatible changes. So don't
hurry for acct_mgr-0.4 right now.

Just noticed what I'd call a bug in signatures.py and removed unreasonable
dependency on identical absolute path for successful check.
Looks like nobody else tried this by now, right? Hey folks!

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.