[Distutils] How to build python-packages depends on the output of other project
Young Yang
afe.young at gmail.com
Thu Jun 2 22:35:01 EDT 2016
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 something I want. Such as compiling the code of project A and
copy the output of it (i.e. the .so file) to my binding folder
install.run(self)
```
At last I add these options in my setup function in setup.py to include
the shared library in the install package.
```
package_dir={'my_binding_package': 'my_binding_folder'},
package_data={
'my_binding_package': ['Shared_lib.so'],
},
include_package_data=True,
```
But I think there should be better ways to achieve these.
Could anyone give me any elegant examples to achieve the same goal?
Thanks in advance
On Thu, Jun 2, 2016 at 11:05 AM, Young Yang <afe.young at gmail.com> wrote:
> 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 that I can install
> everything by run `python setup.py` ?
>
> Any suggestions and comments will be appreciated :)
>
> --
> Best wishes,
> Young
>
--
Best wishes,
Young Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160603/36421705/attachment.html>
More information about the Distutils-SIG
mailing list