seznam / fastrpc

FastRPC library
http://seznam.github.io/frpc
GNU Lesser General Public License v2.1
46 stars 46 forks source link

feat: Static linking of fastrpclib to python wrapper #70

Closed KeNaCo closed 6 years ago

KeNaCo commented 6 years ago

Size of wheel package raise to 2.1MB but can be used as standalone package withou any "hidden" dependencies(except standard library).

KeNaCo commented 6 years ago

@rembish I updated it according to your suggestions. Now it looks much cleaner, thank you.

volca02 commented 6 years ago

I like the motivation, but I don't think this is the right approach. What I had on mind was to share the object files of the C++ part of the project between the C++ library and python module. The problem here is we have two distinct build systems, which makes matters sensitive - not really a robust enough solution to be seen.

Listing files from the src directory in setup.py is not a good idea either, as it would lead to problems when someone adds/removes files in the future.

I'm inclined to think the best solution would be to rework the whole project to use CMake (autotools are dated approach anyways) and then make setup.py induce cmake build with specific setup.

volca02 commented 6 years ago

Something like this - http://www.benjack.io/2018/02/02/python-cpp-revisited.html

KeNaCo commented 6 years ago

I describe my view, how to solve this. In current state, python lib as standalone package is useless, due to hidden libfastrpc dependency. What my PM do, is solve this dependency and just this dependency issue with minimal effort and minimal impact on current codebase. We both agree this is not best way to solve this issue, but its fastest, cheapest and not bug prone.

Your idea isn't wrong at any way. But it take time to implement and also test. And we can start work on that with this PM accepted. It's not like one way block the other.

volca02 commented 6 years ago

The thing is it will make the builds uneasy for anyone not following the intended setup. Stuff like out-of-tree builds will break this, which is something many utilize to leave the git tree cleaner.