FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixed bug in UCS2/UCS4 detection. Thx to Sanghyeon Seo · pythonnet/pythonnet@529cf1f · GitHub

Commit 529cf1f

Browse files
committed
Fixed bug in UCS2/UCS4 detection. Thx to Sanghyeon Seo
1 parent 221715e commit 529cf1f

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

‎pythonnet/Makefile‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ RELEASE = pythonnet-2.0-alpha2
99
KEYFILE = pythonnet.key
1010

1111
PYTHON ?= python
12-
PYTHONVER ?= $(shell $(PYTHON) -c "import sys; print 'PYTHON%i%i' % sys.version_info[:2]")
13-
UCS ?= $(shell $(PYTHON) -c "from distutils.sysconfig import get_config_var; \
14-
print 'UCS%i' % (get_config_var('Py_UNICODE_SIZE') or 2)")
12+
PYTHONVER ?= $(shell $(PYTHON) -c "import sys; \
13+
print 'PYTHON%i%i' % sys.version_info[:2]")
14+
UCS ?= $(shell $(PYTHON) -c "import sys; \
15+
print 'UCS%i' % ((sys.maxunicode > 65536) and 4 or 2)")
1516
SITEPACKAGES = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; \
1617
print get_python_lib(plat_specific=1, standard_lib=0)")
1718
INSTALL=/usr/bin/install -m644
@@ -37,16 +38,16 @@ else
3738
endif
3839

3940
ifeq ($(origin DEFINE), undefined)
40-
_DEFINE = $(PYTHONVER),$(UCS)
41+
_DEFINE =
4142
else
42-
_DEFINE = $(DEFINE),$(PYTHONVER),$(UCS)
43+
_DEFINE = /define:$(DEFINE)
4344
endif
4445

4546
ifeq ($(UCS), UCS4)
4647
RUNTIME_REF = /reference:Mono.Posix.dll
4748
endif
4849

49-
CSC += /define:$(_DEFINE) /nologo $(CSCARGS)
50+
CSC += /define:$(PYTHONVER) /define:$(UCS) $(_DEFINE) /nologo $(CSCARGS)
5051

5152
BASEDIR = $(shell pwd)
5253

@@ -172,3 +173,4 @@ install: all
172173

173174
mkkey:
174175
$(SN) -k $(KEYFILE)
176+

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL