[PyQt] Packaging with sip5

Phil Thompson phil at riverbankcomputing.com
Fri Dec 13 10:48:38 GMT 2019


On 13/12/2019 06:51, Antonio Rojas wrote:
> El jueves, 12 de diciembre de 2019 23:38:41 (CET) Phil Thompson 
> escribió:
>> On 12/12/2019 22:29, Antonio Rojas wrote:
>> > Hi,
>> >  What are the equivalents of 'make' and 'make install DESTDIR=foo'
>> > with sip5? For packaging it is important to have distinct build and
>> > install steps, and the final target install dir may not be available
>> > during the build step. Building pyqt with 'sip-build' still tries to
>> > write to the target dir - which fails if it is not writtable.
>> 
>> If you run 'sip-build -h' you will see there is a '--no-make' option.
>> 
>> Phil
>> 
> 
> Hi, thanks for the quick reply. Even with --no-make, it still fails if
> the target dir is not writtable:
> 
> sip-build: An internal error occurred...
> Traceback (most recent call last):
>   File "/usr/bin/sip-build", line 11, in <module>
>     load_entry_point('sip==5.0.0', 'console_scripts', 'sip-build')()
>   File "/usr/lib/python3.8/site-packages/sipbuild/tools/build.py",
> line 37, in main
>     handle_exception(e)
>   File "/usr/lib/python3.8/site-packages/sipbuild/exceptions.py", line
> 81, in handle_exception
>     raise e
>   File "/usr/lib/python3.8/site-packages/sipbuild/tools/build.py",
> line 34, in main
>     project.build()
>   File "/usr/lib/python3.8/site-packages/sipbuild/project.py", line
> 204, in build
>     self.builder.build()
>   File "/usr/lib/python3.8/site-packages/sipbuild/builder.py", line 50, 
> in build
>     self.build_project(self.project.target_dir)
>   File "/usr/lib/python3.8/site-packages/pyqtbuild/builder.py", line
> 121, in build_project
>     self._generate_module_pro_file(buildable, target_dir,
>   File "/usr/lib/python3.8/site-packages/pyqtbuild/builder.py", line
> 389, in _generate_module_pro_file
>     self._install(pro_lines, installed, installable, target_dir)
>   File "/usr/lib/python3.8/site-packages/pyqtbuild/builder.py", line
> 458, in _install
>     installable.install(target_dir, installed, do_install=False)
>   File "/usr/lib/python3.8/site-packages/sipbuild/installable.py",
> line 61, in install
>     os.makedirs(target_dir, exist_ok=True)
>   File "/usr/lib/python3.8/os.py", line 211, in makedirs
>     makedirs(head, exist_ok=exist_ok)
>   File "/usr/lib/python3.8/os.py", line 221, in makedirs
>     mkdir(name, mode)
> PermissionError: [Errno 13] Permission denied:
> '/usr/lib/python3.8/site-packages/PyQt5/bindings'

What did you do with SIP v4? The generated Makefile should be very 
similar.

Phil


More information about the PyQt mailing list