odlgroup / odlcuda

C++ backend for ODL
GNU General Public License v3.0
5 stars 2 forks source link

Remove pyinstall #9

Open adler-j opened 8 years ago

adler-j commented 8 years ago

We should change remove the custom pyinstall and instead use the built in install found in CMake. This is used in our STIR clone.

kohr-h commented 8 years ago

And use a config flag --use-python? Sounds reasonable.

adler-j commented 8 years ago

I've done some "research" on this and it seems harder than youd expected. We'll see if it happens.

Regarding a --use-python flag I don't see the point, the library is exclusively meant to build a python library. I recently removed the USE_PYTHON CMake flag since it didn't really make sense.

kohr-h commented 8 years ago

You mean it is problematic to change the behavior of make install to do what make pyinstall does now?

What about making the "post-build-and-pre-install" actions part of the build (pybuild maybe) and do the actual installation in the setup.py? Or put all the pyinstall stuff into the setup.py install?

adler-j commented 8 years ago

I think the big move would be to move the whole build system to setup.py instead of MakeFiles directly, I'm not much of an expert there though and it is not priority for now.

adler-j commented 8 years ago

We first need to get the core library to PyPI before it becomes a more urgent issue.

kohr-h commented 8 years ago

I see. Well, maybe I can for now just "hack in" the system installation of odlpp by generating symbolic links in the virtualenv. Then we can run CUDA tests already today. I'll try it.

adler-j commented 8 years ago

That is more related to #10, with that fixed you could select which python to call which should solve your issue?

kohr-h commented 8 years ago

In principle, yes. I need to check if it is possible to install in Python 3. Last time it failed, but that was ages ago.

adler-j commented 8 years ago

The code currently runs python in a terminal, changing it should change where it is installed etc.

adler-j commented 8 years ago

It seems moving to a full setup.py style installation is complicated, matplotlib has a total of about 2500 lines in their build scripts. Basically you need to wrap everything you need yourself it seems. I'm putting it of for now.

Allowing users to select what python version to install with is however preferable and I'll see what can be done.

kohr-h commented 8 years ago

The CMake recipe has a TARGET_PY variable already, is that the python interpreter to be used or is it the "python build target"?

adler-j commented 8 years ago

TARGET_PY is slightly badly named, it is simply where the binaries were installed and where the __init__.py file should go so setup.py can be called on it.