Minor Python3 support improvements
Don't let PYTHON2 and PYTHON3 be both set
Steer to proper include in PYTHON3_ADDINCL
@@ -1774,6 +1774,7 @@ macro NO_PYTHON_INCLUDES() {
macro PYTHON_ADDINCL() {
SET(MODULE_TAG PY2)
SET(PYTHON2 yes)
+ SET(PYTHON3 no)
when ($USE_ARCADIA_PYTHON == "yes") {
ADDINCL+=contrib/libs/python/Include
}
@@ -1798,8 +1799,10 @@ macro PYTHON_ADDINCL() {
macro PYTHON3_ADDINCL() {
SET(MODULE_TAG PY3)
SET(PYTHON3 yes)
+ SET(PYTHON2 no)
SET(PEERDIR_TAGS CPP_PROTO PY3 __EMPTY__)
when ($USE_ARCADIA_PYTHON == "yes") {
+ CFLAGS+=-DUSE_PYTHON3
ADDINCL+=contrib/libs/python/Include
}
otherwise {
@@ -3305,6 +3308,13 @@ macro JAVA_IGNORE_CLASSPATH_CLASH_FOR(Args...) {
macro PY_SRCS() {
DEFAULT(MODULE_TAG PY2)
DEFAULT(PYTHON2 yes)
+ DEFAULT(PYTHON3 no)
+}
+
+macro PY3_SRCS() {
+ DEFAULT(MODULE_TAG PY3)
+ DEFAULT(PYTHON2 no)
+ DEFAULT(PYTHON3 yes)
}
### @usage PY23_LIBRARY([name])
