Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for compile-time configuration of default TZPATH #77

Open
pganssle opened this issue May 29, 2020 · 2 comments
Open

Add support for compile-time configuration of default TZPATH #77

pganssle opened this issue May 29, 2020 · 2 comments

Comments

@pganssle
Copy link
Owner

This is a bit harder to backport, because in CPython we are able to store this information in sysconfig. I think we can generate a file at build time that we use preferentially over the current default values should be enough; it can be populated by an environment variable during the build.

Testing it may be mildly annoying.

CC: @mariocj89

@mariocj89
Copy link

mariocj89 commented May 30, 2020

Do you mean a file within the package which contains the paths to lookup? That sounds good, as it will be easy to patch.

Ideally, I'd expect distributions to just consume the sdist and set the environment variable when repackaging or just use the runtime env var if they need some environment-specific setup.

Sounds great! I'm happy to push a PR for this if you want.

@pganssle
Copy link
Owner Author

Do you mean a file within the package which contains the paths to lookup? That sounds good, as it will be easy to patch.

There would be no need to patch anything like this, it would be configurable at build time.

Ideally, I'd expect distributions to just consume the sdist and set the environment variable when repackaging or just use the runtime env var if they need some environment-specific setup

Currently we don't have any environment variable to set during the build, that's what this issue is about. In CPython, you can do ./config --with-tzpath=/usr/share/zoneinfo, but in this case if you don't have PYTHONTZPATH set, it always searches a pre-defined set of paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants