Just an idea for generating both .pyc and .pyo byte code: have a new command that just generates byte code in an already installed set of files, (perhaps `setup.py compile_only`), then spawn python -o setup.py compile_only from within `setup.py install` -- Harry Henry Gebel, Senior Developer, Landon House SBS West Dover Hundred, Delaware "Why do you look for the living among the dead? He is not here, but has risen." Luke 24:5 (NRSV)
On 25 April 2000, Harry Henry Gebel said:
Just an idea for generating both .pyc and .pyo byte code: have a new command that just generates byte code in an already installed set of files, (perhaps `setup.py compile_only`), then spawn
python -o setup.py compile_only
from within `setup.py install`
It has to be something like that, ie. you need to spawn another python interpreter with the opposite debug state of the current one. Obviously, you want to spawn only one interpreter to compile all installed files. (Or files-to-install if you're creating a built distribution that inclues .pyc and/or .pyo files, which is probably what we want to do for RPM -- I think complex/time-consuming post-install scripts are to be avoided. Anyone have experience with this?) The question is, is it worth the complexity and expense of a whole new Distutils command, or should we just spawn a simple "python -c 'compileall(...)'" command, or should be generate a temporary script and run it? I'm leaning towards the generate-a-temporary-script approach. Any thoughts? Greg -- Greg Ward - just another /P(erl|ython)/ hacker gward@python.net http://starship.python.net/~gward/ The world is coming to an end. Please log off.
On Tue, Apr 25, 2000 at 09:18:07PM -0400, Greg Ward wrote:
On 25 April 2000, Harry Henry Gebel said:
Just an idea for generating both .pyc and .pyo byte code: have a new command that just generates byte code in an already installed set of files, (perhaps `setup.py compile_only`), then spawn
python -o setup.py compile_only
from within `setup.py install`
The question is, is it worth the complexity and expense of a whole new Distutils command, or should we just spawn a simple "python -c 'compileall(...)'" command, or should be generate a temporary script and run it?
I'm leaning towards the generate-a-temporary-script approach. Any thoughts?
Yes, a temporary script is better, it was in the working on bdist_rpm (which has a child process of setup.py (rpm) running it's own copy of setup.py) that put in me in the frame of mind for my idea. -- Harry Henry Gebel, Senior Developer, Landon House SBS West Dover Hundred, Delaware "Why do you look for the living among the dead? He is not here, but has risen." Luke 24:5 (NRSV)
participants (2)
-
Greg Ward
-
Harry Henry Gebel