On 25. Mar 2019, at 14:18, Richard Shaw 
<[email protected]<mailto:[email protected]>> wrote:

On Mon, Mar 25, 2019 at 4:46 AM Alexandru Croitor 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

I assume you're still trying to use the setup.py route, and not the cmake one?

I made a copy my RPM spec file and started changing things over to CMake... 
Maybe I missed it but I see cmake and pkgconf config files installed for 
shiboken that I don't remember seeing using the setuptools method...

Yes, the setuptools method does not install the cmake files, nor the pkg config 
files.



shiboken2 binary is not needed at runtime, just while building, or for 
end-users that want to create their own bindings.

Ok maybe I need to restate... The python files installed: Are they only used by 
the shiboken binary? Or are there other consumers? The reason this is important 
is that I can either bundle the shiboken2 binary with the python files in one 
package "shiboken2" or if there are other consumers of the python 
library/module I need to package it in "python3-shiboken2".


Which python files?

The shiboken binary is part of the shiboken2_generator package. Here is the 
setuptools installed contents on macOS (replace dylib with .so)

Qt
_git_shiboken_generator_version.py
libclang.dylib
shiboken2
__init__.py
_config.py
include
scripts

You probably want to include all of the above as package number one. Except for 
libclang, which I guess would be handled by your RPATH distro mechanisms. You 
would use this while building your own bindings. So it would be a -devel 
package I suppose.

Here is the contents for the shiboken2 package, which does not contain an 
executable, but only python files and shared libraries.
__init__.py
_config.py
docs
libshiboken2.abi3.5.12.dylib
_git_shiboken_module_version.py
files.dir
shiboken2.abi3.so

This would be a second package, different from the first one. All the files 
from this package are needed at runtime (by FreeCAD), except for docs.

Any custom built bindings would depend on this package. The PySide2 package 
also depends on this one.




support folder is needed for runtime.

For shiboken2, correct? So it would be part of the -devel package. What I mean 
by "runtime" is other applications running (not building) such as FreeCAD.

Yes, for shiboken2.



To try and make the --root option work for you, i'd suggest invoking setup.py 
multiple times manually, for each project respectively.
So:

setup.py build  --internal-build-type=shiboken2 --reuse-build .....
setup.py install --root .... --internal-build-type=shiboken2 --reuse-build .....

setup.py build  --internal-build-type=shiboken2-generator --reuse-build ....
setup.py install --root .... --internal-build-type=shiboken2-generator 
--reuse-build ....

setup.py build --internal-build-type=pyside2 --reuse-build .........
setup.py install --root .... --internal-build-type=pyside2 --reuse-build 
........

I may try that but right now I'm thinking the cmake option may be easiest.

Perhaps it's the easier approach, given that Arch uses that approach, and I 
think some ubuntu ppa did at some point as well.


Thanks,
Richard

_______________________________________________
PySide mailing list
[email protected]
https://lists.qt-project.org/listinfo/pyside

Reply via email to