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

How to query the compile target Python version from inside the code? #367

Open
ArneBachmann opened this issue Nov 17, 2017 · 3 comments
Open
Labels

Comments

@ArneBachmann
Copy link
Contributor

I´d like to compile other Coconut files dynamically from my coco script, but I need to know the target version of the current script, otherwise I get results that are incompatible with each other.
Using sys.version_info.major doesn´t work, as the compiling Python may differ from the target Python.

@evhub evhub added the feature label Nov 19, 2017
@evhub
Copy link
Owner

evhub commented Nov 22, 2017

@ArneBachmann I'd rather just solve #320 than make this available--this is the sort of information that really should only be internal to Coconut.

@ArneBachmann
Copy link
Contributor Author

Maybe. But I'm still compiling Coconut code from inside Coconut/Python code (which you recommended against). It works fine so far (setup.py), but it would be good in some cases to know the Coconut target version (for continuous integration, setting up testing environments etc.)

@eindiran
Copy link
Contributor

@ArneBachmann Did #320 adequately cover your use case? If not, do you need the exact version number (e.g. "2.6.x"), the major and minor version number (e.g. "3.1"), or just the major number? From the initial comment, it looks like you only need the major version number.

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

No branches or pull requests

3 participants