Conversation
be sure to put down -'fixes #60' in the first comment description, so that the issue automatically closes out. Other than that, thanks for opening :) |
|
@totaam The workflows will help. They all use msvc by default so this way if they fail you'll be able to figure out why. |
|
This PR can't work as it is, so it's no surprise that the checks fail. |
It's ok I'm offering code suggestions to help you :) |
| @@ -250,19 +250,16 @@ def build_extensions(self): | |||
| "winloop/loop.pyx" | |||
| ], | |||
| include_dirs=[ | |||
There was a problem hiding this comment.
| include_dirs=[ | |
| if not ('GCC' in sys.version): | |
| include_dirs=[ | |
| "vendor/libuv/src", | |
| "vendor/libuv/src/win", | |
| "vendor/libuv/include" | |
| ] | |
We need to remember to retain compatibility with MSVC. This should be a start...
| "vendor/libuv/src/win", | ||
| "vendor/libuv/include" | ||
| ], | ||
| extra_link_args=[ # subset of libuv Windows libraries |
There was a problem hiding this comment.
| extra_link_args=[ # subset of libuv Windows libraries | |
| extra_link_args=[ # subset of libuv Windows libraries | |
| "Shell32.lib", | |
| "Ws2_32.lib", | |
| "Advapi32.lib", | |
| "iphlpapi.lib", | |
| "Userenv.lib", | |
| "User32.lib", | |
| "Dbghelp.lib", | |
| "Ole32.lib" | |
| ] if not ('GCC' in sys.version) else [ | |
| "-lShell32", | |
| "-lWs2_32", | |
| "-lAdvapi32", | |
| "-liphlpapi", | |
| "-lUserenv", | |
| "-lUser32", | |
| "-lDbghelp", | |
| "-lOle32", | |
| ] |
This should help.
winloop/loop.pyx
Outdated
| def _get_backend_id(self): | ||
| """This method is used by uvloop tests and is not part of the API.""" | ||
| return uv.uv_backend_fd(self.uvloop) | ||
| return int(<uintptr_t> uv.uv_backend_fd(<uv.uv_loop_t*> self.uvloop)) |
There was a problem hiding this comment.
| return int(<uintptr_t> uv.uv_backend_fd(<uv.uv_loop_t*> self.uvloop)) | |
| return int(<uintptr_t> uv.uv_backend_fd(self.uvloop)) |
Not sure if recasting self.uvloop is a good idea. it's already defined as uv.uv_loop_t* in the pxd file. But I appreciate your attempt.
There was a problem hiding this comment.
You're right, this part is not needed.
There was a problem hiding this comment.
And neither was the re-definition of uv.pipe_t via a cdef extern.
setup.py
Outdated
| def initialize_options(self): | ||
| super().initialize_options() | ||
| self.use_system_libuv = False | ||
| self.use_system_libuv = True |
There was a problem hiding this comment.
I don't think we need this line to be flipped to True since there should be a compiler argument that does that.
There was a problem hiding this comment.
Sure, I only did this because I have absolutely no idea how to toggle it any other way.
./setup.py --with-use-system-libyuv, or any reasonable argument I tried. How does it work?
|
@totaam You'll want to merge your branch with some of the upcoming changes I made to winloop I left a few changes you could make to make mysys support happen |
|
For future reference, this was one of the compilation errors: I will open a clean new PR. |
No description provided.