-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
start to support windows #125
Conversation
@@ -12,7 +12,10 @@ | |||
class TestParseItem(HPyTest): | |||
def make_parse_item(self, fmt, type, hpy_converter): | |||
mod = self.make_module(""" | |||
__attribute__((unused)) static inline |
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.
maybe we should hide this difference behind a macro and put it in hpy.h
. It looks like a generally useful feature.
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.
but hpy.h is not imported where the macro is needed
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.
yes, it's included automatically by make_module
:
Lines 56 to 61 in d5c8442
def expand(self): | |
self.defines_table = [] | |
self.type_table = [] | |
self.output = ['#include <hpy.h>'] | |
for line in self.src.split('\n'): | |
match = self.r_marker.match(line) |
I wonder what construct MSVC will support instead of
|
Happy for help if someone sees how to fix the int/long/long long failures. The current proof-of-concept failure is due to trying to set up a virtualenv where one already exists. |
It turns out the proof-of-concept run was confusing various virtual environments since it used This is evident when running the In 26ef55b I added a call to _install_hpy to fix this. |
…e used to initialize HPy instances.
…n't recognise a cast as a constant expression.
…he file path, not str(path) with quotes around it.
Can it be part of upcoming PyPy-7.3.5 64bit for Windows ? It could help for your May 11th PyCon Langage Summit presentation |
PyPy implements its own |
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.
These are the issues that I think are still outstanding:
__attribute__((unused)) static void hpy_magic_dump(HPy h) | ||
#ifndef _MSC_VER | ||
__attribute__((unused)) | ||
#endif |
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.
We should define HPy_UNUSED
in macros.h
and then use that everywhere.
// signature as HPy_MODINIT | ||
|
||
// Copied from Python's exports.h | ||
#ifndef Py_EXPORTED_SYMBOL |
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.
Should we call this HPy_EXPORTED_SYMBOL
and add it to macros.h
?
@@ -2,6 +2,11 @@ | |||
#define HPY_UNIVERSAL_HPYTYPE_H | |||
|
|||
#include <stdbool.h> | |||
#ifdef __GNUC__ | |||
#define HPyAPI_UNUSED __attribute__((unused)) static inline |
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 this should also be moved to macros.h
.
Merging now and fixing up the other issues in subsequent PRs sounds good to me. This PR is already quite large. |
Merged! |
There is no Windows wheel on pypi for hpy-0.9.0 |
The windows wheels are explicity excluded. Will this github workflow run without a tag, on a PR to debug the windows builds? |
Sorry for my late answer. When we've migrated to GitHub Workflows, building wheels for Windows using |
if hpy is to become a PEP, it would make sense to at least check it can generate a Windows wheel |
it passes one test, but fails to link on others.Solved.I think a libraries argument is needed on windows to make the linking happySolvedThere is a problem with theSolved%TEMP%
path used in pytest, see TST: simplify source path names in compilation test numpy/numpy#17658Support windows in build and tests