Skip to content

Commit

Permalink
try get more python working on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan committed Feb 11, 2023
1 parent 75d252d commit 3122aba
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
TICK_DEBUG: 0
TICK_WERROR: 0
MKN_CL_PREFERRED: 1
MKN_COMPILE_THREADS: 2

jobs:
build:
Expand All @@ -21,10 +22,10 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
python-version: ['3.7'] # '3.8', '3.9', '3.10', have dll init issues
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand Down
4 changes: 2 additions & 2 deletions lib/mkn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ property:
lib_path: ./../tick
cargs: -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION
-D_FILE_OFFSET_BITS=64 -DPYTHON_LINK -DNDEBUG
win_cargs: -GL -MD -EHsc -DBUILDING_DLL -std:c++11
win_cargs: -GL -MD -EHsc -DBUILDING_DLL
nixish_cargs: -fwrapv -O2 -Wall
-fstack-protector-strong
-Wformat -Werror -Wdate-time
Expand Down Expand Up @@ -53,7 +53,7 @@ profile:
if_link:
nix_lib: ${nix_largs}
bsd_lib: ${bsd_largs}
win: -nodefaultlib:libucrt.lib ucrt.lib -MANIFEST:EMBED,ID=2 -MANIFESTUAC:NO -LTCG
win: -LTCG # -nodefaultlib:libucrt.lib ucrt.lib -MANIFEST:EMBED,ID=2 -MANIFESTUAC:NO

- name: base
parent: arg
Expand Down
2 changes: 2 additions & 0 deletions lib/swig/tick/array/array_module.i
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
#include "numpy/arrayobject.h"
#include "numpy/npy_math.h"

#ifndef _WIN32
// initialize python and numpy
int tick_import_numpy(){
Py_Initialize();
return _import_array();
}
static const int tick_numpy_import = tick_import_numpy();
#endif

#include "tick/base/debug.h"
#include "tick/array/carray_python.h"
Expand Down
4 changes: 2 additions & 2 deletions sh/configure_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
######################################################################

set -ex
set -e

echo "Entering configure_env.sh"

Expand Down Expand Up @@ -329,7 +329,7 @@ MKN=${MKN:-mkn}
export MKN_LIB_LINK_LIB=1
export TICK_CONFIGURED=1

echo "Finished configure_env.sh for python (${PYVER}.${PYVER_MIN}) with the following args"
echo "Finished configure_env.sh for python (${PYVER}) with the following args"
echo "LDARGS = ${LDARGS}"
echo ""
##
Expand Down
2 changes: 1 addition & 1 deletion sh/mkn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pushd $CWD/.. 2>&1 > /dev/null
ROOT=$PWD
popd 2>&1 > /dev/null

source $ROOT/sh/configure_env.sh
source $CWD/configure_env.sh

COMPILE=1
LINK=1
Expand Down

0 comments on commit 3122aba

Please sign in to comment.