Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Commit

Permalink
Try to find headers in /usr/local, as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Sep 17, 2013
1 parent 0b8f652 commit dccec8e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions generate.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from cffi import FFI
import os

def functions(dir):
INCLUDE = ['/usr/include/nanomsg', '/usr/local/include/nanomsg']

def functions():

for dir in INCLUDE:
if os.path.exists(dir):
break

lines = []
for fn in os.listdir(dir):
Expand Down Expand Up @@ -43,7 +49,7 @@ def symbols(headers):

if __name__ == '__main__':

headers = functions('/usr/include/nanomsg')
headers = functions()
with open('nnpy/nanomsg.h', 'w') as f:
f.write(headers)

Expand Down

0 comments on commit dccec8e

Please sign in to comment.