Skip to content

Commit

Permalink
Clean up setup.py syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavies-st committed Feb 22, 2021
1 parent aa09088 commit cc34ed8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ select =
E722

[tool:pytest]
minversion = 3.0
norecursedirs = .eggs build docs/_build
minversion = 4.6
norecursedirs = build docs/_build
doctest_plus = enabled
21 changes: 8 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,24 @@


def get_extensions():
ROOT = os.path.dirname(__file__)
SRCDIR = os.path.join(ROOT, 'src')
cfg = {
'include_dirs': [],
'libraries': [],
'define_macros': []
}

srcdir = os.path.join(os.path.dirname(__file__), 'src')
cdriz_sources = ['cdrizzleapi.c',
'cdrizzleblot.c',
'cdrizzlebox.c',
'cdrizzlemap.c',
'cdrizzleutil.c',
os.path.join('tests', 'utest_cdrizzle.c')]
sources = [os.path.join(srcdir, x) for x in cdriz_sources]

sources = [os.path.join(SRCDIR, x) for x in cdriz_sources]

cfg = {
'include_dirs': [],
'libraries': [],
'define_macros': []
}
cfg['include_dirs'].append(numpy.get_include())
cfg['include_dirs'].append(SRCDIR)

cfg['include_dirs'].append(srcdir)
if sys.platform != 'win32':
cfg['libraries'].append('m')

if sys.platform == 'win32':
cfg['define_macros'].append(('WIN32', None))
cfg['define_macros'].append(('__STDC__', 1))
Expand Down

0 comments on commit cc34ed8

Please sign in to comment.