-
Notifications
You must be signed in to change notification settings - Fork 2
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 PyPy to 'python' tool. #23
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #23 +/- ##
===========================================
- Coverage 72.91% 72.84% -0.07%
===========================================
Files 71 71
Lines 4065 4081 +16
===========================================
+ Hits 2964 2973 +9
- Misses 1101 1108 +7
Continue to review full report at Codecov.
|
src/faber/tools/python.py
Outdated
self.libpath = join(prefix, 'libs') | ||
self.lib = 'python' + version | ||
if impl == 'CPython': | ||
version = self.check_python('import sys; print("%d%d"%sys.version_info[0:2])') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are looking for sysconfig.get_config_var('py_version_nodot')
since on python 3.10 this will become 3_10
not 310
(at least that is the direction from python/cypthon#20333)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tip !
flags = self.check_sysconfig('get_config_var("LINKFORSHARED")') | ||
if flags is not None: | ||
flags=flags.split() | ||
self.ldflags = ldflags(*flags) # TODO: use them ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need an else
clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps, but as this code is merely shifting these lines around, I'd rather not touch the logic within this PR.
You may want to think about changing
|
Thanks for the suggestions. As to the difference between (Python's packaging and distribution support is a big mess !) The other two suggestions are fine. I'm a fan of f-strings, too, and as I just recently decided to no longer support Python 2.7, will happily clean up the code incrementally. |
|
Merged manually. |
I just noticed that the |
On CPython2 you can do
which returns
for me, so take |
No description provided.