Skip to content
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 setuptools #182

Closed
wants to merge 7 commits into from
Closed

Use setuptools #182

wants to merge 7 commits into from

Conversation

paskino
Copy link
Contributor

@paskino paskino commented Mar 6, 2024

This PR uses setuptools, pip and cythonize to build and install the python wrapper. A new pyproject.toml file is added in src/Python directory.

Although it builds I still have troubles in testing after a local build as in #178

Notice that this PR simplifies the setup file and adds a second Extension in the setup command with the CMake variables SETUP_GPU_WRAPPERS and GPU_EXTRA_LIBRARIES.

This is built with the cythonize command

https://github.com/vais-ral/CCPi-Regularisation-Toolkit/blob/e229a7219797938e200174b8262a861ee766fb3f/src/Python/setup-regularisers.py.in#L57-L77

@paskino
Copy link
Contributor Author

paskino commented Mar 7, 2024

conda build is failing with

error: Error: setup script specifies an absolute path:

    /home/jenkins/conda-bld/ccpi-regulariser_1709812762250/work/src/Python/src/cpu_regularisers.cpp

setup() arguments must *always* be /-separated paths relative to the
setup.py directory, *never* absolute paths.

@paskino
Copy link
Contributor Author

paskino commented Mar 11, 2024

@casperdcl and I tried many things but we couldn't make cython build correctly.

Given #178 (comment) I am working at removing the Cython interface using ctypes.

See https://github.com/vais-ral/CCPi-Regularisation-Toolkit/blob/use_ctypes/demos/test_ctypes.py

@paskino paskino closed this Mar 11, 2024
@casperdcl casperdcl deleted the use_setuptools branch March 18, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants