Re: Proposal: 7.2b2 today

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: 7.2b2 today
Date: 2001-11-07 01:07:49
Message-ID: Pine.LNX.4.30.0111070031590.3607-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

D'Arcy J.M. Cain writes:

> I have a change I would like to discuss. It doesn't change the code
> base, only the build system. The patches I would like to commit follow
> this text. The only thing it does is create a config option to bytecode
> compile the Python modules.

We've seen such a patch before, but I'm still not convinced it works.
According to my knowledge, the pre-compiled bytecode files need to be
created after the source files have been installed in their final
location, because the file name and timestamp is encoded in the compiled
file (it's sort of used as a cache file). While this can be accomplished
with a different patch, it wouldn't really work when DESTDIR is used
because you'd create a "dead" cache file. In a sense, this operation is
like running ldconfig -- it's outside the scope of the build system.
Package managers typically put it in the "post install" section.

> +# If python is enabled (above), then optionally byte-compile the modules.
> +AC_MSG_CHECKING([whether to byte-compile Python modules])
> +if test "$with_python" = yes; then
> + PGAC_ARG_BOOL(with, python_compile, no,
> + [ --with-python-compile byte-compile modules if Python is enabled])

--enable

> +else
> + with_python_compile=no
> +fi
> +AC_MSG_RESULT([$with_python_compile])
> +AC_SUBST([with_python_compile])

> +%.pyc: %.py
> + python -c "import py_compile; py_compile.compile(\"$<\")"
> +
> +%.pyo: %.py
> + python -O -c "import py_compile; py_compile.compile(\"$<\")"
> +

$(PYTHON)

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-11-07 01:12:45 Re: pgsql/src/backend/postmaster postmaster.c
Previous Message Tom Lane 2001-11-07 00:08:28 Re: RelationFlushRelation() or RelationClearRelation()