computationalpathologygroup / ASAP

Program for the analysis and visualization of whole-slide images in digital pathology
https://computationalpathologygroup.github.io/ASAP/
GNU General Public License v2.0
607 stars 163 forks source link

[Feature request] Create PyPI build of ASAP #236

Open robogast opened 2 years ago

robogast commented 2 years ago

Problem

Working with the multiresolutionimageinterface python code is currently cumbersome, because no PyPI build of ASAP exists. This means ASAP doesn't integrate well with most python environment managers (pip/conda/venv/etc), resulting in a problematic (re-)installation process of ASAP-dependent python code, and difficult dependency control ('what version of ASAP are we running?').

Solution

Create a PyPI build of the multiresolutionimageinterface, with the ASAP binaries bundled.

GeertLitjens commented 2 years ago

Hi,

This is something I have thought about a lot, but it is a bit complicated due to the binary dependencies. If anyone can help out with it, that would be greatly appreciated.

Kind regards,

Geert

Op vr 4 mrt. 2022 om 12:25 schreef Robert Jan Schlimbach < @.***>:

Problem

Working with the multiresolutionimageinterface python code is currently cumbersome, because no PyPI build of ASAP exists. This means ASAP doesn't integrate well with most python environment managers (pip/conda/venv/etc), resulting in a problematic (re-)installation process of ASAP-dependent python code, and difficult dependency control ('what version of ASAP are we running?'). Solution

Create a PyPI build of the multiresolutionimageinterface, with the ASAP binaries bundled.

— Reply to this email directly, view it on GitHub https://github.com/computationalpathologygroup/ASAP/issues/236, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJIFUH7EOQBU6P2F4HCITDU6HXMPANCNFSM5P5I5V7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

kaczmarj commented 2 years ago

i have some experience with this, though i don't have time at the moment to execute this. i'm including some of my thoughts on this.

make a python wheel

first a python wheel file will have to be made of multiresolutionimageinterface. this will require a setup.py file or similar to describe the package. it would be great if a pre-built multiresolutionimageinterface could be packaged into a wheel (i.e., without having to specify the cmake builds in the setup.py file). if this is possible, then we could move to the next step.

if this does not work, then the cmake build will probably have to be specified in setup.py or similar file. see https://stackoverflow.com/a/48015772/5666087 for an example. this would be a headache to implement, so it would be best to try packaging a pre-build multiresolutionimageinterface.

to make this package usable on most recent linux distros, multiresolutionimageinterface should be built on an older linux distro, like centos 6. take a look at https://github.com/pypa/manylinux

put the shared libraries into the wheel

auditwheel can be used to copy the shared libraries into the python wheel. it probably won't be as easy as i make it out to be though :)