When wrap C++ code into Python program, preprocessor directives disabled

I wrap my C++ code for use from Python, according
This methodology seems disables other pre-processor directives. That is, when I use in my C++ .h file different constructors in different branches:
#define MY_CASE

#ifdef MY_CASE
CV_WRAP_AS(my_class1) my_class(Arg1, Arg2, Arg3);
#else //another case
CV_WRAP_AS(my_class2) my_class(Arg1);

(same directives embrace corresponding implementations in .cpp)
compilation gives an error
no matching function for call to ‘bv::my_class::my_class(Arg1)’
if(self) ERRWRAP2(self->v.reset(new bv::my_class(Arg1)));

but this branch with my_class(Arg1) must be invisible!
Also, the program works correctly being compiled with Qt-creator within pure C++.
The same effect when I use CV_WRAP, CV_EXPORTS_W, CV_EXPORTS_AS(…).