sip: patch: support absolute filepath in name argument

Milan Hauth milahu at gmail.com
Thu Jun 9 22:59:48 BST 2022


there are some more occurences in distinfo.py

to patch all of them:

sed -i.bak -E \
's/(prefix_dir) \+ ([a-z_.]+)/os.path.join(\1, \2)/g' \
sipbuild/distinfo/distinfo.py


2022-06-09 21:45 GMT+02:00, Milan Hauth <milahu at gmail.com>:
> sip-6.6.1/sipbuild/distinfo/distinfo.py
>
> ```diff
> -    real_distinfo_dir = prefix_dir + distinfo_dir
> +    real_distinfo_dir = os.path.join(prefix_dir, distinfo_dir)
> ```
>
> example input, as generated by pyqt-builder:
>
> prefix_dir = /build/tmp0ou30mo2
> distinfo_dir = /build/tmp0ou30mo2/wheel/PyQt6-6.3.0.dist-info
>
> actual: /build/tmp0ou30mo2/build/tmp0ou30mo2/wheel/PyQt6-6.3.0.dist-info
> expected: /build/tmp0ou30mo2/wheel/PyQt6-6.3.0.dist-info
>
> test:
> os.path.join(
>   "/build/tmp0ou30mo2",
>   "/build/tmp0ou30mo2/wheel/PyQt6-6.3.0.dist-info"
> )
>


More information about the PyQt mailing list