Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeolson committed Jun 21, 2018
1 parent 0989b73 commit 378f88d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Expand Up @@ -5,3 +5,4 @@ include MANIFEST.in
include README.md
include requirements.txt
include pyamg/amg_core/*.h
include pyamg/amg_core/tests/*.h
3 changes: 3 additions & 0 deletions pyamg/amg_core/tests/__init__.py
@@ -0,0 +1,3 @@
from __future__ import absolute_import

from .bind_examples import *
2 changes: 1 addition & 1 deletion pyamg/amg_core/tests/test_bind_examples.py
@@ -1,4 +1,4 @@
from . import bind_examples as g
import pyamg.amg_core.tests.bind_examples as g
import numpy as np
from numpy.testing import TestCase
from pytest import raises as assert_raises
Expand Down
9 changes: 7 additions & 2 deletions setup.py
Expand Up @@ -226,18 +226,23 @@ def __str__(self):
'linalg.h',
'relaxation.h',
'ruge_stuben.h',
'smoothed_aggregation.h',
'tests/bind_examples.h']
'smoothed_aggregation.h']
amg_core_headers = [f.replace('.h', '') for f in amg_core_headers]

ext_modules = [Extension('pyamg.amg_core._amg_core',
sources=['pyamg/amg_core/amg_core_wrap.cxx'],
define_macros=[('__STDC_FORMAT_MACROS', 1)])]

ext_modules += [Extension('pyamg.amg_core.%s' % f,
sources=['pyamg/amg_core/%s_bind.cpp' % f],
include_dirs=[get_pybind_include(), get_pybind_include(user=True)],
language='c++') for f in amg_core_headers]

ext_modules += [Extension('pyamg.amg_core.tests.bind_examples',
sources=['pyamg/amg_core/tests/bind_examples_bind.cpp'],
include_dirs=[get_pybind_include(), get_pybind_include(user=True)],
language='c++')]

setup(
name='pyamg',
version=fullversion,
Expand Down

0 comments on commit 378f88d

Please sign in to comment.