[wingide-users] Compiled pyton in windows

Dan Cook onedsc at sonic.net
Tue Jun 26 13:41:48 MDT 2007


You can create a simple makefile rule to use the compile module of python.
I have done this:

${TARGET_DIR}/%.pyc: ./src/%.py
    @test -d `dirname $@` | mkdir -p `dirname $@`
    $(PYTHON) -c "import py_compile; py_compile.compile(\"$<\",\"$@\")"

Where TARGET_DIR is the dir of the pyc files.



-----Original Message-----
From: wingide-users-bounces at wingware.com
[mailto:wingide-users-bounces at wingware.com] On Behalf Of Wyant, Jaime
Sent: Tuesday, June 26, 2007 5:53 AM
To: wingide-users at wingware.com
Subject: RE: [wingide-users] Compiled pyton in windows

I don't think there is a way to have .pyc files not show up in their
associated source file directories.  It makes sense if you think about it,
otherwise how would you know what package a module belongs to?  I guess you
could have some elaborate `tree mirror' somewhere, but that well it's pretty
elaborate :).

But if you just want to skip *.pyc files, you could use tar's --exclude.
I think the command line would look something like this:

tar --exclude='*.pyc' -cjf mytarfile.tar.bz2 sourcedir

HTH!
jw

> -----Original Message-----
> From: Tom Stambaugh [mailto:tms at zeetix.com]
> Sent: Monday, June 25, 2007 6:01 PM
> To: wingide-users at wingware.com
> Subject: [wingide-users] Compiled pyton in windows
> 
> This question is as much about python as wing, but this group might
know
> the
> answer.
> 
> Is there a way to configure wing or python so that the compiled (.pyc) 
> files go into a different directory hierarchy than the source? I'd 
> like to
be
> able
> to ftp the source tree up to my (linux) server, and I'd like to leave
the
> compiled files behind.
> 
> 
> 
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide



More information about the wingide-users mailing list