Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow build under windows. #10

Merged
merged 2 commits into from
Mar 5, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 7 additions & 9 deletions silx/io/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#
# ###########################################################################*/

__authors__ = ["P. Knobel"]
__authors__ = ["P. Knobel", "V.A. Solé"]
__license__ = "MIT"
__date__ = "26/02/2016"
__date__ = "05/03/2016"

import os
import sys
Expand All @@ -50,9 +50,6 @@
define_macros = [('WIN32',None)]
elif os.name.lower().startswith('posix'):
define_macros = [('SPECFILE_POSIX', None)]
#this one is more efficient but keeps the locale
#changed for longer time
#define_macros = [('PYMCA_POSIX', None)]
#the best choice is to have _GNU_SOURCE defined
#as a compilation flag because that allows the
#use of strtod_l
Expand All @@ -61,21 +58,22 @@
else:
define_macros = []


def configuration(parent_package='', top_path=None):
current_dir = os.path.dirname(__file__)
config = Configuration('io', parent_package, top_path)
config.add_subpackage('test')

srcfiles = ['sfheader','sfinit','sflists','sfdata','sfindex',
'sflabel' ,'sfmca', 'sftools','locale_management']
sources = ['specfile/src/'+ffile+'.c' for ffile in srcfiles]
sources.append('specfile/specfile.pyx')
sources = [os.path.join(current_dir, 'specfile', 'src', ffile+'.c') for ffile in srcfiles]
sources.append(os.path.join(current_dir, 'specfile', 'specfile.pyx'))


config.add_extension('specfile',
sources=sources,
define_macros = define_macros,
include_dirs = ['specfile/include', numpy.get_include()],
include_dirs = [os.path.join(current_dir, 'specfile', 'include'),
numpy.get_include()],
language='c')

return config
Expand Down