[PyQt] [SIP] Multi-platform pyproject.toml (platform dependent values)

Matteo Bertini naufraghi at develer.com
Thu Dec 12 09:15:55 GMT 2019


On Wed, Dec 11, 2019 at 11:04 PM Phil Thompson <phil at riverbankcomputing.com>
wrote:

> On 11/12/2019 15:46, Matteo Bertini wrote:
> >
> > I tried using this syntax
> > https://www.python.org/dev/peps/pep-0566/#environment-markers:
> >
> >     libraries = ["usb-1.0; 'linux' in sys_platform"]
> >
> > But seems to be unsupported.
>
> If you need to do any introspection (ie. you need to write code) then
> you need a project.py file.
>

Can you point me to some documentation or example? Searching the filename
gives me a lot of unrelated results.

Alternatively, is there some interest in supporting the linked
environment-markers syntax? (or even, if I spend some time on the feature,
are you interested in merging it?)


> > 2) I tried using paths relative to `pyproject.toml` bus sip fails not
> > finding my `.h` files (found using the absolute path), what is the best
> > practice here?
>
> Configure 'include_dirs'?
>

Let me explain, my project is in `/home/matteo/someproject`, with
`pyproject.toml` and `somename.sip` + `somename.h` in the root of the
project.

  [tool.sip.bindings.somename]
  include-dirs = ["."]

^^^ fails, instead the absolute path below works:

   [tool.sip.bindings.somename]
   include-dirs = ["/home/matteo/someproject"]

-- 
/ Matteo Bertini
\ naufraghi at develer.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20191212/599cdf9b/attachment.html>


More information about the PyQt mailing list