Re: Proposal: 7.2b2 today - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Proposal: 7.2b2 today
Date
Msg-id Pine.LNX.4.30.0203201437340.812-100000@peter.localdomain
Whole thread Raw
In response to Re: Proposal: 7.2b2 today  ("D'Arcy J.M. Cain" <darcy@druid.net>)
List pgsql-hackers
D'Arcy J.M. Cain writes:

> Do you have a reference for this?  I tried looking for one but the only
> thing I could find was http://www.python.org/doc/1.6/dist/built-dist.html
> which suggests to me that they can be compiled before shipping which of
> course certainly involves moving them.  In any case NetBSD does this
> patch before building and everything works there.

My reference is Automake.  They go out of their way to compile the Python
files at the right time.  We could use this as a model.

It's easy to determine that the time stamp appears to be encoded into the
compiled output file:

$ cat test.py
print "test"
$ python -c 'import py_compile; py_compile.compile("test.py", "test.pyc")'
$ md5sum test.pyc
a0e690271636fcbf067db628f9c7d0c3 test.pyc
$ python -c 'import py_compile; py_compile.compile("test.py", "test.pyc")'
$ md5sum test.pyc
a0e690271636fcbf067db628f9c7d0c3 test.pyc
$ touch test.py
$ python -c 'import py_compile; py_compile.compile("test.py", "test.pyc")'
$ md5sum test.pyc
1d78ae79994b102c89a14a2dd2addc55  test.pyc

What you need to do is to create the compiled files after you have
installed the original.  Binary packaging probably preserves the time
stamps of the files, so that shouldn't be a problem.  I withdraw that part
of the objection.

Also, I think if we add this feature, let's just make it the default and
not add another configure option for it.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Firebird 2.0 moving to C++
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Fixes gram.y