How to make pyton pckage that depends on python-csnd6?
Date | 2015-12-09 16:09 |
From | Anton Kholomiov |
Subject | How to make pyton pckage that depends on python-csnd6? |
The setuptools is a standard way to describe
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
the python packages. With it we can list a list of dependencies. The deps are fetched automatically if user wants to install our package. What is a proper way to list python binding to Csound: csnd6 as dependency? Has anyone solved this problem? I saw a csnd package on pip. But what is alternative solution for csnd6? Cheers, Anton |
Date | 2015-12-09 21:19 |
From | Steven Yi |
Subject | Re: How to make pyton pckage that depends on python-csnd6? |
Hi Anton, I don't think we've ever distributed csnd or csnd6 except as part of an installer. The issue I see is that even if we package up the csnd6.py, _csnd6.so, and so on, it's not clear what to do about the plugin libraries. I don't know if there is a convention for this for python packages? I think the current situation is that users on OSX and Windows can use the installers, or building and running "make install" should work on OSX and Linux. If I understand correctly, we might be able to do a python package that compiles csound from source and overrides the default OPCODE6DIR64 path that Csound uses. With that, at package install time, it could then build plugins and place them in a subdirectory that would be separate from where the standard plugins are installed. Perhaps you should file an issue on Github for this? Maybe someone who has time and experience with putting together python packages can contribute some time. steven On Wed, Dec 9, 2015 at 11:09 AM, Anton Kholomiov |
Date | 2015-12-10 08:10 |
From | Anton Kholomiov |
Subject | Re: How to make pyton pckage that depends on python-csnd6? |
Thanks for sincere reply. So it's an open task. What's problem with plugins? Do you mean that python have to provide some tools/flags for selective installation to support plugins? PS: I'm a beginner with python distribution tools. but providing that python can flawlessly install such a monster as wxWidgets I think there have to be some tools to make it work with Csound too. Anton 2015-12-10 0:19 GMT+03:00 Steven Yi <stevenyi@gmail.com>: Hi Anton, |
Date | 2015-12-10 14:26 |
From | Steven Yi |
Subject | Re: How to make pyton pckage that depends on python-csnd6? |
The issue with plugins is that when you build the Python wrapper to Csound, it depends just upon libcsound. However, when starting Csound, it will look for plugins in the OPCODE6DIR64 folder and use the libraries for opcodes, I/O (audio, MIDI, displays), and other things. If we build a standalone python module, it's easy enough to have the wrapper part and just the single libcsound dependency. The tricky part is also providing the plugin libraries in a folder that can be discovered by python-csound, one that can be isolated from a standard Csound installation. So if a user installs csnd6 from pip, pip will have to build and install libcsound, csnd6, and plugin modules, to have a running python csound system that is comparable to what they get if they install Csound using an installer or running "make install". Also, for python's version of Csound, it would need to have the default OPCODE6DIR64 set to where it installs the plugin libraries. For the standard Csound builds today, we rely on csnd6 linking to the same libcsound used for the command line executable csound, which all rely on the default OPCODE6DIR64. I took a look at the setup.py file for wxpython [1] and it looks like for us to do something similar, we'd have to essentially do what our CMake build script does but using setuptools from python. This is just a guess though as I have no experience with this. Link [2] has some information about using CMake and distutils that might useful. I do wonder if there is an alternative way than doing the compilation of the native sources when installing the module, say, having pre-built library modules packaged. That could potentially be another path to take. [1] - https://github.com/wxWidgets/wxPython/blob/master/setup.py [2] - https://bloerg.net/2012/11/10/cmake-and-distutils.html On Thu, Dec 10, 2015 at 3:10 AM, Anton Kholomiov |