-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix build and tests #14
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_check_error() from pyzoltan/core/zoltan.pyx was imported in .pyx files in pyzoltan/core/ without specifing full path from project root. With some configurations* this would result in some confusion while cythonizing. Seems like it is looking for zoltan.pxd in project root. The error reads: ``` [3/3] Cythonizing pyzoltan/core/zoltan_dd.pyx /usr/share/miniconda/envs/test/lib/python3.11/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-req-build-ev58duqe/pyzoltan/core/zoltan_dd.pxd tree = Parsing.p_module(s, pxd, full_module_name) Error compiling Cython file: ------------------------------------------------------------ ... """Example for the Zoltan Distributed data directory""" from zoltan cimport _check_error ^ ------------------------------------------------------------ pyzoltan/core/zoltan_dd.pyx:2:0: 'zoltan.pxd' not found Error compiling Cython file: ------------------------------------------------------------ ... """Example for the Zoltan Distributed data directory""" from zoltan cimport _check_error ^ ------------------------------------------------------------ pyzoltan/core/zoltan_dd.pyx:2:0: 'zoltan/_check_error.pxd' not found Error compiling Cython file: ------------------------------------------------------------ ... """ self.comm = comm.ob_mpi ierr = Zoltan_DD_Create(&self.dd, self.comm, 1, 1, 0, 0, 0) _check_error( ierr ) ^ ------------------------------------------------------------ pyzoltan/core/zoltan_dd.pyx:31:8: '_check_error' is not a constant, variable or function identifier Error compiling Cython file: ------------------------------------------------------------ ... """ cdef int nentries = gid.length ierr = Zoltan_DD_Update(self.dd, gid.data, NULL, NULL, part.data, nentries) _check_error( ierr ) ^ ------------------------------------------------------------ pyzoltan/core/zoltan_dd.pyx:53:8: '_check_error' is not a constant, variable or function identifier Error compiling Cython file: ------------------------------------------------------------ ... own.resize( count ) part.resize( count ) ierr = Zoltan_DD_Find( self.dd, gid.data, NULL, NULL, part.data, count, own.data ) _check_error( ierr ) ^ ------------------------------------------------------------ pyzoltan/core/zoltan_dd.pyx:83:8: '_check_error' is not a constant, variable or function identifier Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/tmp/pip-req-build-ev58duqe/setup.py", line 423, in <module> setup_package() File "/tmp/pip-req-build-ev58duqe/setup.py", line 363, in setup_package ext_modules = cythonize( ^^^^^^^^^^ File "/usr/share/miniconda/envs/test/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1115, in cythonize cythonize_one(*args) File "/usr/share/miniconda/envs/test/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1238, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: pyzoltan/core/zoltan_dd.pyx ``` doing away with relative imports seems to fix this
Since cyarray contains cython and numpy as build requirements in pyproject.toml, pip should install cython and numpy install before cyarray. See https://stackoverflow.com/a/54138355 However, it seems like this does not happen and the numpy import in cyarray's setup.py fails with ModuleNotFoundError. So, cython and numpy are installed before. Also installing cyarray/master, not from pypi
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.