-
Notifications
You must be signed in to change notification settings - Fork 915
Support for building Windows wheels #451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
environment: | ||
global: | ||
LIBRDKAFKA_NUGET_VERSION: 0.11.6-RC2 | ||
CIBW_SKIP: cp33-* cp34-* | ||
CIBW_TEST_REQUIRES: pytest requests avro | ||
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the | ||
# /E:ON and /V:ON options are not enabled in the batch script intepreter | ||
# See: http://stackoverflow.com/a/13751649/163740 | ||
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\tools\\appveyor\\run_with_env.cmd" | ||
|
||
build_script: | ||
- tools/windows-build.bat | ||
|
||
artifacts: | ||
- path: "wheelhouse\\*.whl" | ||
name: Wheels | ||
|
||
deploy: | ||
- provider: S3 | ||
access_key_id: | ||
secure: RIuhB6QPQeCdchBMSmaY/7aSrrdih+HJu443UaKsH/I= | ||
secret_access_key: | ||
secure: YrPW943StN3C9o9enGGpfMns7wxD7+lArRgEavjeWlO2uy2jLPKkCnSQ60qe1ffB | ||
region: us-west-1 | ||
bucket: librdkafka-ci-packages | ||
folder: confluent-kafka-python/p-confluent-kafka-python__bld-appveyor__plat-windows__bldtype-release__tag-$(APPVEYOR_REPO_TAG_NAME)__sha-$(APPVEYOR_REPO_COMMIT)__bid-$(APPVEYOR_BUILD_ID) | ||
artifact: /wheelhouse\/.*\.whl/ | ||
max_error_retry: 3 | ||
on: | ||
APPVEYOR_REPO_TAG: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -756,15 +756,15 @@ static PyObject *TopicPartition_str0 (TopicPartition *self) { | |
PyObject *ret; | ||
char offset_str[40]; | ||
|
||
snprintf(offset_str, sizeof(offset_str), "%"PRId64"", self->offset); | ||
snprintf(offset_str, sizeof(offset_str), "%"CFL_PRId64"", self->offset); | ||
|
||
if (self->error != Py_None) { | ||
errstr = cfl_PyObject_Unistr(self->error); | ||
c_errstr = cfl_PyUnistr_AsUTF8(errstr, &errstr8); | ||
} | ||
|
||
ret = cfl_PyUnistr( | ||
_FromFormat("TopicPartition{topic=%s,partition=%"PRId32 | ||
_FromFormat("TopicPartition{topic=%s,partition=%"CFL_PRId32 | ||
",offset=%s,error=%s}", | ||
self->topic, self->partition, | ||
offset_str, | ||
|
@@ -1282,14 +1282,14 @@ static void log_cb (const rd_kafka_t *rk, int level, | |
CallState *cs; | ||
static const int level_map[8] = { | ||
/* Map syslog levels to python logging levels */ | ||
[0] = 50, /* LOG_EMERG -> logging.CRITICAL */ | ||
[1] = 50, /* LOG_ALERT -> logging.CRITICAL */ | ||
[2] = 50, /* LOG_CRIT -> logging.CRITICAL */ | ||
[3] = 40, /* LOG_ERR -> logging.ERROR */ | ||
[4] = 30, /* LOG_WARNING -> logging.WARNING */ | ||
[5] = 20, /* LOG_NOTICE -> logging.INFO */ | ||
[6] = 20, /* LOG_INFO -> logging.INFO */ | ||
[7] = 10, /* LOG_DEBUG -> logging.DEBUG */ | ||
50, /* LOG_EMERG -> logging.CRITICAL */ | ||
50, /* LOG_ALERT -> logging.CRITICAL */ | ||
50, /* LOG_CRIT -> logging.CRITICAL */ | ||
40, /* LOG_ERR -> logging.ERROR */ | ||
30, /* LOG_WARNING -> logging.WARNING */ | ||
20, /* LOG_NOTICE -> logging.INFO */ | ||
20, /* LOG_INFO -> logging.INFO */ | ||
10, /* LOG_DEBUG -> logging.DEBUG */ | ||
}; | ||
|
||
cs = CallState_get(h); | ||
|
@@ -1444,7 +1444,7 @@ static int producer_conf_set_special (Handle *self, rd_kafka_conf_t *conf, | |
rd_kafka_topic_conf_t *tconf, | ||
const char *name, PyObject *valobj) { | ||
|
||
if (!strcasecmp(name, "on_delivery")) { | ||
if (!strcmp(name, "on_delivery")) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are Windows alternatives, but since python is case-sensitive, and we haven't made any claims that on_delivery, et.al, may be specified in non lower-case, I think it is safe to remove this "feature". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you're good with it I'm good with it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then I'm good with it |
||
if (!PyCallable_Check(valobj)) { | ||
cfl_PyErr_Format( | ||
RD_KAFKA_RESP_ERR__INVALID_ARG, | ||
|
@@ -1486,7 +1486,7 @@ static int consumer_conf_set_special (Handle *self, rd_kafka_conf_t *conf, | |
rd_kafka_topic_conf_t *tconf, | ||
const char *name, PyObject *valobj) { | ||
|
||
if (!strcasecmp(name, "on_commit")) { | ||
if (!strcmp(name, "on_commit")) { | ||
if (!PyCallable_Check(valobj)) { | ||
cfl_PyErr_Format( | ||
RD_KAFKA_RESP_ERR__INVALID_ARG, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if any implications are there to allocating on the heap as opposed to the stack for these Admin operations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*aside from needing to add free
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially used alloca() to avoid having to call free, alloca is also alot faster, but this isn't the hot-path so it doesn't matter.
Had to change it to malloc since the MSVC for Python 2.7 is really old and doesn't support alloca.