-
Notifications
You must be signed in to change notification settings - Fork 279
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
Use cython distutils directives #2509
Use cython distutils directives #2509
Conversation
So I think this is ready to be looked at. I know that the conditional compiles need to be addressed (just pyembree; gperftools is addressed in #2510 ) and that right now the parallelized build has to be turned back on, but otherwise this should be OK. |
I've ticked off the boxes for conditional compilation of embree, and I've reverted to using the overridden |
I should note that for the purposes of review, nearly 100% of the changes that are meaningful happened in |
I'm happy to review this but it's going to be a week or so until after the 3.6 release. I want to comment about it here so you know it's not being forgotten! 🙂 |
I'm hoping that once this is in, we can do header-level cython directives instead of function-level, which should make debugging easier as we can toggle them on/off from the command line instead of modifying individual functions. This script implements that.
|
I've merged with upstream post-#2513 to run with the new tests. |
--- a/setup.py
+++ b/setup.py
@@ -42,7 +42,7 @@ with open('README.md') as file:
if check_for_openmp() is True:
omp_args = ['-fopenmp']
else:
- omp_args = None
+ omp_args = []
if os.name == "nt":
std_libs = [] did the trick for me on OSX. |
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.
This looks good to me. It looks like there is also some mesh traversal stuff in the test install script:
https://github.com/yt-project/yt/blob/yt-4.0/tests/test_install_script.py#L39
and I think also the gitignore might need to be updated? https://github.com/yt-project/yt/blob/yt-4.0/.gitignore#L61
Had to fix the conflicts; ptal |
@jzuhone can you check that I've correctly ported your |
This is the start of a process to make all the modules use
cythonize
and distutils directives. In the first PR, it just convertsyt/geometry/
.Putting the configuration information into the files themselves should make it easier to update them. But, if we decide this isn't what we want, then it isn't what we want!
At present this is not working for in-place builds, which I'm hoping to address soon. Basically, the question before us is: would this be an improvement for developers' lives? I think all of the conditional compilations can be handled in this way.