[issue19932] Missing spaces in import.h?

2013-12-10 Thread Brett Cannon

Brett Cannon added the comment:

So it sounds like this specific issue is fixed. If you keep having build 
issues, Ziyuan, feel free to open another issue with the new problems.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19932] Missing spaces in import.h?

2013-12-09 Thread Brett Cannon

Brett Cannon added the comment:

In case no one else sees it, Ziyuan is saying that there should be a space 
after the PyAPI_FUNC() uses.

--
nosy: +brett.cannon

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19932] Missing spaces in import.h?

2013-12-09 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19932] Missing spaces in import.h?

2013-12-09 Thread Ziyuan Lin

Ziyuan Lin added the comment:

Yes, although I left out the space after the third PyAPI_FUNC().

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19932] Missing spaces in import.h?

2013-12-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7b077c691fef by Victor Stinner in branch '3.3':
Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes.
http://hg.python.org/cpython/rev/7b077c691fef

New changeset e017cd46009a by Victor Stinner in branch 'default':
(Merge 3.3) Issue #19932: Fix typo in import.h, missing whitespaces in function 
prototypes.
http://hg.python.org/cpython/rev/e017cd46009a

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19932] Missing spaces in import.h?

2013-12-09 Thread STINNER Victor

STINNER Victor added the comment:

@Ziyuan Lin: The issue should now be fixed, can you please confirm?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19932] Missing spaces in import.h?

2013-12-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb1039fe090c by Victor Stinner in branch '2.7':
Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes.
http://hg.python.org/cpython/rev/eb1039fe090c

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19932] Missing spaces in import.h?

2013-12-09 Thread Ziyuan Lin

Ziyuan Lin added the comment:

I can't build the cpython with Visual Studio 2012 because of the following 
errors:


D:\Repository\cpython\PCbuild\pcbuild.sln (default target) (1) -
D:\Repository\cpython\PCbuild\_msi.vcxproj (default target) (13) -
(Link target) -
  LINK : fatal error LNK1181: cannot open input file 'fci.lib' 
[D:\Repository\cpython\PCbuild\_ msi.vcxproj]

D:\Repository\cpython\PCbuild\pcbuild.sln (default target) (1) -
D:\Repository\cpython\PCbuild\_ssl.vcxproj (default target) (17) -
D:\Repository\cpython\PCbuild\ssl.vcxproj (default target) (18) -
(Build target) -
  C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets(38,5): error 
MSB3073:
 The command cd D:\Repository\cpython\PCbuild\ 
[D:\Repository\cpython\PCbuild\ssl. vcxproj]
C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets(38,5): error 
MSB3073:  D:\Repository\cpython\PCbuild\amd64\python_d.exe build_ssl.py 
Release x64 -a [D:\Rep ository\cpython\PCbuild\ssl.vcxproj]
C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets(38,5): error 
MSB3073: 
 exited with code 1. [D:\Repository\cpython\PCbuild\ssl.vcxproj]


Anyway, I replaced Python33/Include/import.h with cpython/Include/import.h 
directly, and it works well with my sample code. Thank you.


By the way, here's a discussion about the fci.lib issue, which suggests 
replacing fci.lib with cabinet.lib: 
http://social.msdn.microsoft.com/Forums/vstudio/en-US/3b85f36e-dffe-4589-adc3-13673b349812/missing-fcilib-in-windows-sdk-80?forum=vcgeneral

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19932] Missing spaces in import.h?

2013-12-08 Thread Ziyuan Lin

New submission from Ziyuan Lin:

In Include\import.h, line 89-97:

PyAPI_FUNC(PyObject *)_PyImport_FindBuiltin(
const char *name/* UTF-8 encoded string */
);
PyAPI_FUNC(PyObject *)_PyImport_FindExtensionObject(PyObject *, PyObject *);
PyAPI_FUNC(int)_PyImport_FixupBuiltin(
PyObject *mod,
char *name  /* UTF-8 encoded string */
);
PyAPI_FUNC(int)_PyImport_FixupExtensionObject(PyObject*, PyObject *, PyObject 
*);


Shouldn't they be the following:

PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin(
const char *name/* UTF-8 encoded string */
);
PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *);
PyAPI_FUNC(int)_PyImport_FixupBuiltin(
PyObject *mod,
char *name  /* UTF-8 encoded string */
);
PyAPI_FUNC(int) _PyImport_FixupExtensionObject(PyObject*, PyObject *, PyObject 
*);

--
messages: 205605
nosy: Ziyuan.Lin
priority: normal
severity: normal
status: open
title: Missing spaces in import.h?
type: compile error
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19932] Missing spaces in import.h?

2013-12-08 Thread Ziyuan Lin

Ziyuan Lin added the comment:

To see the errors, one can install PyCUDA and Theano, and run code at 
http://deeplearning.net/software/theano/tutorial/using_gpu.html#id1 :


import numpy, theano
import theano.misc.pycuda_init
from pycuda.compiler import SourceModule
import theano.sandbox.cuda as cuda

class PyCUDADoubleOp(theano.Op):
def __eq__(self, other):
return type(self) == type(other)
def __hash__(self):
return hash(type(self))
def __str__(self):
return self.__class__.__name__
def make_node(self, inp):
inp = cuda.basic_ops.gpu_contiguous(
   cuda.basic_ops.as_cuda_ndarray_variable(inp))
assert inp.dtype == float32
return theano.Apply(self, [inp], [inp.type()])
def make_thunk(self, node, storage_map, _, _2):
mod = SourceModule(
__global__ void my_fct(float * i0, float * o0, int size) {
int i = blockIdx.x*blockDim.x + threadIdx.x;
if(isize){
o0[i] = i0[i]*2;
}
  })
pycuda_fct = mod.get_function(my_fct)
inputs = [ storage_map[v] for v in node.inputs]
outputs = [ storage_map[v] for v in node.outputs]
def thunk():
z = outputs[0]
if z[0] is None or z[0].shape!=inputs[0][0].shape:
z[0] = cuda.CudaNdarray.zeros(inputs[0][0].shape)
grid = (int(numpy.ceil(inputs[0][0].size / 512.)),1)
pycuda_fct(inputs[0][0], z[0], numpy.intc(inputs[0][0].size),
   block=(512,1,1), grid=grid)
return thunk


The interpreter will complain errors like c:\python33\include\import.h(97): 
error: explicit type is missing (int assumed) (at least in my case)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com