balbasty / nitorch

Neuroimaging in PyTorch
Other
86 stars 14 forks source link

Build does not work outside of `develop` mode #1

Closed balbasty closed 4 years ago

balbasty commented 4 years ago

The current build systems uses the distutils.Extension system to compile non-python shared library that actual extensions link against. This means that the location of the built libraries must be known to link the final extension, but this location is within the temporary build directory, which is not known from outside build_ext. Furthermore, dependencies are not handled, so parallel build cannot be used.

As a prerequisite, note that we currently implement our own (extension of) build_ext in buildtools.py. This class handles cuda files and SharedLibrary extensions. SharedLibrary is a subclass of Extension that specifies that the extension is not a python extension but a dynamic library against which python extension can link.

Potential solutions:

brudfors commented 4 years ago

Is this related to it being difficult to share the code using pip/conda?

pip install nitorch

If not, maybe that should be another issue/todo?

balbasty commented 4 years ago

It’s more like a prerequisite. If all options of setup.py work, it becomes possible to build os-specific wheels, which can be uploaded to PyPI. pip install then automatically downloads those wheels from PyPI.

brudfors commented 4 years ago

Okay