Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

Again: gadfly + py2exe HELP really needed

已查看 0 次
跳至第一个未读帖子

Max

未读,
2002年5月26日 05:21:532002/5/26
收件人
Hi everybody. Excuse me for bothering again with an old question... but i
still can't solve my problem.
The problem is that i can't make a windows exe (with py2exe 0.3.3) because
the exe form of the program (wich runs perfectly under interpreter) exits
when i try to ask:

mydb = gadfly.gadfly()

I supposed the problem could be some module not imported automatically by
py2exe, but i tried many modules (md5, marshal, string, re (sre, pre),
types, socket, select) with NO success at all!
py2exe, however, gives me the following error:

copying C:\Python22\lib\site-packages\gadfly\kjbuckets.pyd ->
dist\SMPNotaMain
warning: py2exe:
***************************************************************
**********
warning: py2exe: * The following modules were not found:
warning: py2exe: * cmndlgsc
warning: py2exe: * imagec
warning: py2exe: * clip_dndc
warning: py2exe: * windows3c
warning: py2exe: * filesysc
warning: py2exe: * eventsc
warning: py2exe: * windows2c
warning: py2exe: * controlsc
warning: py2exe: * ic
warning: py2exe: * misc2c
warning: py2exe: * controls2c
warning: py2exe: * os.path
warning: py2exe: * windowsc
warning: py2exe: * stattoolc
warning: py2exe: * mdic
warning: py2exe: * gdic
warning: py2exe: * sizersc
warning: py2exe: * printfwc
warning: py2exe: * streamsc
warning: py2exe: * miscc
warning: py2exe: * framesc
warning: py2exe:
***************************************************************
**********

i always supposed this error was due to kjbuckets.pyd (wich i copied in that
directory, as written in the readme for installing gadfly...)
If i haven't misunderstood, the kjbuckets.pyd should be the compiled
version, and the package should run anyway, corect? And what all these
modules ending with "c" are?
Now i have some new doubts about all that...

And the last question i have to solve is: can i keep using gadfly in the
hope to make my "exe" one day, or it's better to go back to a previous
version, less flexible but working? I know i'm the only one that can answer
the last question but... any help i GREATLY appreciated...

Hi everybody,
Max


Richard Jones

未读,
2002年5月26日 18:42:232002/5/26
收件人
On Sun, 26 May 2002 19:21, Max wrote:
> Hi everybody. Excuse me for bothering again with an old question... but i
> still can't solve my problem.
> The problem is that i can't make a windows exe (with py2exe 0.3.3) because
> the exe form of the program (wich runs perfectly under interpreter) exits
> when i try to ask:
>
> mydb = gadfly.gadfly()

Sorry, I have no clues about py2exe. I don't have a windows machine to test
py2exe on.

Have you examined the imports using "python -v"?

Have you contacted the py2exe author?


> I supposed the problem could be some module not imported automatically by
> py2exe, but i tried many modules (md5, marshal, string, re (sre, pre),
> types, socket, select) with NO success at all!
> py2exe, however, gives me the following error:
>
> copying C:\Python22\lib\site-packages\gadfly\kjbuckets.pyd ->
> dist\SMPNotaMain

Try not including the kjbuckets C module. It is optional - it gives a speedup
but if you can get gadfly working without it, that's a start!


Richard

Max

未读,
2002年5月27日 09:22:422002/5/27
收件人
"Richard Jones" <rjo...@ekit-inc.com> ha scritto nel messaggio
news:mailman.1022455725...@python.org...

> On Sun, 26 May 2002 19:21, Max wrote:
[...]

> Have you examined the imports using "python -v"?

Yes, and forced all the modules i found whithout success...

> Have you contacted the py2exe author?

No, but could be next step... :)

> Try not including the kjbuckets C module. It is optional - it gives a
speedup
> but if you can get gadfly working without it, that's a start!

I had tried this option too, whithout success...

Thanks for your suggestions...
Max


Marcus Stojek

未读,
2002年5月27日 16:16:492002/5/27
收件人
On Sun, 26 May 2002 09:21:53 GMT, "Max" <nos...@nospam.nospam> wrote:

Hi,
I had a similar problem some time ago. In the build_exe.py of py2exe I
found the following lines:

## Hmm. These are module which are automatically available
## when wxPython is imported.
## Maybe when wxPythin is detected, these should go into mf.excludes?
"wxPython": ["miscc", "windowsc", "streamsc", "gdic", "sizersc",
"controls2c","printfwc", "framesc", "stattoolc", "misc2c",
"controlsc","windows2c", "eventsc", "windows3c", "clip_dndc", "mdic",
"imagec", "cmndlgsc", "filesysc"],

although I am not really understanding what's going on here I wrote a
setup file for py2exe:

setup.cfg:
[py2exe]
optimize=2
excludes=
windowsc,miscc,streamsc,gdic,sizersc,controls2c,printfwc,framesc,stattoolc,misc2c,controlsc,windows2c,eventsc,windows3c,clip_dndc,mdic,imagec,cmndlgsc,filesysc

et voila, all warnings dissapeared and the exe file worked. From
reading the docs I would have guessed that the program should work
even with the warnings (That's why they are called warnings and not
errors, so maybe you have a different problem on top.) Did you try the
installer ? I think there is a debug option somewhere that might tell
you more. Did you check your code for things like:

exec "from "+ modulename +" import *"?


A second thing is the os.path warning. In my case found the
corresponding import line in the file vtkpython.py where it was used
for an testing function that I bluntly deleted. In my code I use

import os
and os.path.something....

this works fine. I have absolutely no idea why import os.path doesn't.

Again, as I am a Newbie don't rely on my posting, but it worked for
me.

Marcus

Max

未读,
2002年5月28日 09:16:392002/5/28
收件人
"Marcus Stojek" <sto...@part-gmbh.de> ha scritto nel messaggio
news:3cf28f2f...@news.easynews.net...

> On Sun, 26 May 2002 09:21:53 GMT, "Max" <nos...@nospam.nospam> wrote:
>
> Hi,
> I had a similar problem some time ago. In the build_exe.py of py2exe I
> found the following lines:
[...]
> excludes=
[...]

Nice idea, i tried but still have no good results...

> errors, so maybe you have a different problem on top.) Did you try the
> installer ? I think there is a debug option somewhere that might tell

what do you mean "did you try the installer?"

> you more. Did you check your code for things like:
>
> exec "from "+ modulename +" import *"?

I have nothing like that...

> A second thing is the os.path warning. In my case found the

I already asked that question, the os.path is a specific import based on the
os you're running upon.
There is a warning, but the program still works correctly

[...]


> Again, as I am a Newbie don't rely on my posting, but it worked for
> me.

[...]

I'm too...
And thanks for the help... :)


Gordon McMillan

未读,
2002年5月28日 11:06:222002/5/28
收件人
Max wrote:

[snip]

> Nice idea, i tried but still have no good results...

I've seen no indication you saw my earlier post, so
I'll try again.

gadfly has a runtime dependency on a file which *not*
a .py file, and is *not* imported. It is read using
marshal, and it contains the SQL grammar.

I haven't used gadfly in a couple years, so you'll have
to hunt down the exact filename and where it's expected
to live.

-- Gordon
http://www.mcmillan-inc.com/

Richard Jones

未读,
2002年5月28日 18:08:532002/5/28
收件人
On Wed, 29 May 2002 01:06, Gordon McMillan wrote:
> Max wrote:
>
> [snip]
>
> > Nice idea, i tried but still have no good results...
>
> I've seen no indication you saw my earlier post, so
> I'll try again.
>
> gadfly has a runtime dependency on a file which *not*
> a .py file, and is *not* imported. It is read using
> marshal, and it contains the SQL grammar.

Gadfly has been reworked to *not* use a special marshal file. All gadfly
imports are of python modules. Some are at runtime, since there's still
circular imports that I have yet to remove.


> I haven't used gadfly in a couple years

... so I'll forgive you for making false claims :)


Richard

Max

未读,
2002年5月28日 21:31:072002/5/28
收件人
"Gordon McMillan" <gm...@hypernet.com> ha scritto nel messaggio
news:Xns921C711B4A11...@199.171.54.214...
[...]

> I've seen no indication you saw my earlier post, so

I'm sorry!

> gadfly has a runtime dependency on a file which *not*
> a .py file, and is *not* imported. It is read using
> marshal, and it contains the SQL grammar.

In fact, this seems a nice information... but i'm not sure i understand what
you mean...
Maybe you're talking about kjbuckets.pyd? In this case i tried to build
without it (since it shouln't be mandatory).
If this is not the case, i have no idea which file might be, and what should
i do with it once discovered "who" it is...

> I haven't used gadfly in a couple years, so you'll have
> to hunt down the exact filename and where it's expected
> to live.

Thanks a lot for the help...
Max


0 个新帖子