Re: [Distutils] How to build python-packages depends on the output of other project

2016-06-06 Thread Young Yang
Thanks for your detailed reply. @Ionel Thanks for reminding me extending other classes! @Daniel @Chris Thanks for telling me the extension solution. I didn't know that before. But the project A I relied is complex one and has it's cmakelist.txt. I don't want to re-implement the compile process

Re: [Distutils] How to build python-packages depends on the output of other project

2016-06-03 Thread Chris Barker
First, what you have is not all that inelegant -- it is the way to do it :-) But there are a few options when you are wrapping a C/C++ lib for python: Do you need to access that lib from other extensions or only from the one extension? IF others, then you pretty much need to build a shared lib

Re: [Distutils] How to build python-packages depends on the output of other project

2016-06-03 Thread Daniel Holth
I have some less elegant suggestions. In my ed25519ll package I abuse the Extension class to compile some source code (that is not a Python extension). This works if the C package you are compiling is simple enough that it can be built with the limited Extension interface.

Re: [Distutils] How to build python-packages depends on the output of other project

2016-06-03 Thread Ionel Cristian Mărieș via Distutils-SIG
On Fri, Jun 3, 2016 at 5:35 AM, Young Yang wrote: > my_install is a subclass of `from setuptools.command.install import > install` > ``` > class my_install(install): > def run(self): > # DO something I want. Such as compiling the code of project A and > copy the

Re: [Distutils] How to build python-packages depends on the output of other project

2016-06-03 Thread Young Yang
Hi, My current solution is like this I get the source code of project A. And use `cmdclass={"install": my_install},` in my setup function in setup.py. my_install is a subclass of `from setuptools.command.install import install` ``` class my_install(install): def run(self): # DO

[Distutils] How to build python-packages depends on the output of other project

2016-06-03 Thread Young Yang
hi, I'm writing python-binding for project A. My python-binding depends on the compile output of project A(It is a .so file), and the project A is not installed in the system(so we can't find the .so files in the system libraries pathes) What's the elegant way to package my python-binding, so