Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05b39d7

Browse files
committed
Fixed Windows build (using conda).
1 parent 466255e commit 05b39d7

File tree

8 files changed

+38
-4
lines changed

8 files changed

+38
-4
lines changed

conda-requirements.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
numpy
2+
dateutil
3+
freetype
4+
nose
5+
pyparsing
6+
pytz
7+
tornado
8+
libpng
9+
zlib
10+
pyqt
11+
distribute
12+
mock

setupext.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,8 @@ def hardcoded_tcl_config(self):
14571457

14581458
def add_flags(self, ext):
14591459
if sys.platform == 'win32':
1460+
# We hardcode the tk versions for Windows - there is no
1461+
# fundamental reason for this, and we should fix it.
14601462
major, minor1, minor2, s, tmp = sys.version_info
14611463
if sys.version_info[0:2] < (3, 4):
14621464
ext.include_dirs.extend(['win32_static/include/tcl85'])

src/_path_wrapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "numpy_cpp.h"
22

3+
#include "mplutils.h"
34
#include "_path.h"
45

56
#include "py_converters.h"

src/ft2font.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <string>
66

77
#include "ft2font.h"
8-
#include "mplutils.h"
98

109
#ifndef M_PI
1110
#define M_PI 3.14159265358979323846264338328

src/ft2font.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
#ifndef _FT2FONT_H
55
#define _FT2FONT_H
66
#include <vector>
7-
#include <stdint.h>
7+
8+
#include "mplutils.h"
89

910
extern "C" {
1011
#include <ft2build.h>

src/mplutils.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
#define _MPLUTILS_H
77

88
#if defined(_MSC_VER) && _MSC_VER <= 1600
9-
typedef unsigned __int8 uint8_t;
9+
// http://stackoverflow.com/a/127166/4237086
10+
typedef unsigned char uint8_t;
11+
typedef __int32 int32_t;
12+
typedef unsigned __int32 uint32_t;
13+
typedef __int64 int64_t;
14+
typedef unsigned __int64 uint64_t;
1015
#else
1116
#include <stdint.h>
1217
#endif

src/numpy_cpp.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,15 @@ struct type_num_of<npy_clongdouble>
175175
value = NPY_CLONGDOUBLE
176176
};
177177
};
178-
#endif
179178
template <>
180179
struct type_num_of<std::complex<npy_longdouble> >
181180
{
182181
enum {
183182
value = NPY_CLONGDOUBLE
184183
};
185184
};
185+
#endif
186+
186187
template <>
187188
struct type_num_of<PyObject *>
188189
{

windows_build_steps.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
http://www.activestate.com/activetcl/downloads/thank-you?dl=http://downloads.activestate.com/ActiveTcl/releases/8.5.16.0/ActiveTcl8.5.16.0.298506-win32-ix86-threaded.exes
2+
3+
4+
conda install --file conda-requirements.txt
5+
6+
call Visual Studio 9\VC\vcvarsall.bat
7+
8+
set INCLUDE=%INCLUDE%;C:\Users\Will\Miniconda\Library\include;C:\tcl\include
9+
10+
set LIB=%LIB%;C:\Users\Will\Miniconda\Library\lib;C:\tcl\lib
11+
set PATH=%PATH%;C:\Users\Will\Miniconda\Library\bin
12+
13+
copy libpng.lib to png.lib

0 commit comments

Comments
 (0)