This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author twouters
Recipients belopolsky, lemburg, p-ganssle, steve.dower, twouters
Date 2020-05-11.08:23:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589185435.78.0.0419631617169.issue40503@roundup.psfhosted.org>
In-reply-to
Content
The normal way to do this (for make/autoconf) is to add a --with-tzpath argument to configure.ac, and a make variable to pass it to the compilation of anything that needs it. You can then access it from Python code with sysconfig.get_config_var().

In configure.ac, AC_SUBST(TZPATH) makes configure replace @TZPATH@ in the Makefile with the value you set to $TZPATH in configure.ac.  You then either add that to the global PY_CFLAGS_NODIST, or modify the build rule for the module that needs it to pass it along. (See for example how GITTAG/GITVERSION/GITBRANCH are passed to Modules/getbuildinfo.o.)

AC_ARG_WITH() is how you add a new --with-* argument to configure. The usual way people do this is by copying one of the other AC_ARG_WITH blocks and modifying it to suit their needs. It's a mixture of m4 and shell that can be a bit annoying to get right, but it's pretty flexible. Run autoreconf to regenerate configure. You can manually check that the shell in configure makes sense.

Something will have to be done on the Windows side as well, but I'm not sure what. Adding Steve Dower for that.
History
Date User Action Args
2020-05-11 08:23:55twouterssetrecipients: + twouters, lemburg, belopolsky, steve.dower, p-ganssle
2020-05-11 08:23:55twouterssetmessageid: <1589185435.78.0.0419631617169.issue40503@roundup.psfhosted.org>
2020-05-11 08:23:55twouterslinkissue40503 messages
2020-05-11 08:23:55twouterscreate