openpaperwork / libpillowfight

Small library containing various image processing algorithms (+ Python 3 bindings) that has almost no dependencies -- Moved to Gnome's Gitlab
https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight
62 stars 13 forks source link

`install_c` root folder #17

Closed StreakyCobra closed 6 years ago

StreakyCobra commented 6 years ago

Hi,

For the Archlinux package I have to install pypillowfight not system-wide directly, but first to a subfolder that will then be used to create the package that Archlinux will install.

For the python part I can do it by specifying the root folder with the ${PIP_ARGS} variable:

PIP_ARGS="--root=\"${pkgdir}\" --optimize=1" make install

So for the install_py target it's fine, but for the install_c target it is not possible yet as far as I know:

https://github.com/openpaperwork/libpillowfight/blob/9d2cde0c2f5660d957c068f3383462e757a9c8ad/Makefile#L72-L73

Any solution for this? Thx!

jflesch commented 6 years ago

Hmm, to be honest, I've never bothered installing the C library not-system-wide :) How did you do it before ? Did you give extra arguments to make or cmake ?

StreakyCobra commented 6 years ago

How did you do it before ?

Now you say that… I wasn't installing it :see_no_evil: Haha I was just python setup.py installing it! Never had any trouble with paperwork though :thinking:

jflesch commented 6 years ago

No surprise here. You only need the python version for Paperwork. --> make install_py is enough for pypillowfight + Paperwork. I'll have a look later for the C library. There is probably an option or an environment variable somewhere in cmake for that.

jflesch commented 6 years ago

Just to clarify:

make install_py doesn't install Python bindings. make install_py just runs python3 ./setup.py install which compiles libpillowfight as an independant Python module. make install_c compiles libpillowfight as a classic C library.

I did it this way because it simplified a lot the distribution of Paperwork and its dependencies through Pypi.

However, now that I can distribute Paperwork using Flatpak, the next libraries I will make won't be as focused on Pypi distribution as this one :). (I intend to make a library "Libinsane" to replace "Pyinsane", and it will be entirely in C with GObject bindings).

StreakyCobra commented 6 years ago

Ok, I thought the python part was mainly bindings to the C code, hence my surprise.

Anyway… nobody never complained about the .so library missing, so I will keep this package as it is for now. If someone ask for the .so binding in AUR, I'll offer him to take over the package.

So let's say the problem is resolved! ;-)