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

Commit

Permalink
Fix build problems with CPATH and cppnanomsg. (#39)
Browse files Browse the repository at this point in the history
* Fix build problems with CPATH and cppnanomsg.

* Switch to simple endswith for the filename check.
  • Loading branch information
0xE1E10 authored and djc committed Nov 14, 2016
1 parent cf3a3fd commit 8246228
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def header_files(include_paths):
for dir in include_paths:
if os.path.exists(dir):
break
return {fn: os.path.join(dir, fn) for fn in os.listdir(dir)}
return {fn: os.path.join(dir, fn) for fn in os.listdir(dir)
if fn.endswith('.h')}

def functions(hfiles):

Expand Down Expand Up @@ -96,8 +97,8 @@ def create_module():

if 'CPATH' in os.environ:
cpaths = os.getenv('CPATH').split(os.pathsep)
site_cfg['include_dirs'] += [os.path.join(p, 'nanomsg')
for p in cpaths]
set_source_args['include_dirs'] += [os.path.join(p, 'nanomsg')
for p in cpaths]

hfiles = header_files(set_source_args['include_dirs'])
# remove ws.h due to https://github.com/nanomsg/nanomsg/issues/467
Expand Down

0 comments on commit 8246228

Please sign in to comment.