Skip to content

Commit

Permalink
Merge pull request #82 from sot/mark-build-win-fix
Browse files Browse the repository at this point in the history
Bugfix to build on Windows from mbaski
  • Loading branch information
jeanconn authored Feb 27, 2020
2 parents 34744b0 + b8e9d68 commit 0999a5a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@
"""

if os.name == "nt":
link_args = ['/EXPORT:calc_model_1', '/EXPORT:calc_model_2']
core1_ext = Extension('xija.core_1', ['xija/core_1.c'],
extra_link_args=['/EXPORT:calc_model_1'])
core2_ext = Extension('xija.core_2', ['xija/core_2.c'],
extra_link_args=['/EXPORT:calc_model_2'])
else:
link_args = []
core1_ext = Extension('xija.core_1', ['xija/core_1.c'])
core2_ext = Extension('xija.core_2', ['xija/core_2.c'])

try:
from testr.setup_helper import cmdclass
except ImportError:
cmdclass = {}

core1_ext = Extension('xija.core_1', ['xija/core_1.c'],
extra_link_args=link_args)
core2_ext = Extension('xija.core_2', ['xija/core_2.c'],
extra_link_args=link_args)

entry_points = {'console_scripts': 'xija_gui_fit = xija.gui_fit:main'}

setup(name='xija',
Expand Down
2 changes: 1 addition & 1 deletion xija/core_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#if PY_MAJOR_VERSION < 3
void initcore(void)
#else
void PyInit_core(void)
void PyInit_core_1(void)
#endif
{
/* stub initialization function needed by distutils on Windows */
Expand Down
2 changes: 1 addition & 1 deletion xija/core_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#if PY_MAJOR_VERSION < 3
void initcore(void)
#else
void PyInit_core(void)
void PyInit_core_2(void)
#endif
{
/* stub initialization function needed by distutils on Windows */
Expand Down

0 comments on commit 0999a5a

Please sign in to comment.