encukou / py3c

A Python 2/3 compatibility layer for C extensions
http://py3c.readthedocs.org
MIT License
59 stars 20 forks source link

Fix $(realpath ...) substitution on OSX. #13

Closed brainy closed 6 years ago

brainy commented 6 years ago

On OSX, if the target path does not exist, $(realpath $(includedir)) will return an empty string, which makes the pkg-config template somewhat useless.

This change ensures that the path exists before the template is substituted.

encukou commented 6 years ago

This will make make py3c.pc fail if includedir (/usr/local/include) doesn't exist and the user doesn't have permissions for it. But I guess that's acceptable.

encukou commented 6 years ago

Pushed as https://github.com/encukou/py3c/commit/e452f93e5095dfc0a5cb2f47ff59c716cd1c5a7c Thank you!