kou commented on code in PR #117:
URL: https://github.com/apache/arrow-go/pull/117#discussion_r1751774560


##########
ci/scripts/go_cgo_python_test.sh:
##########
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -ex

Review Comment:
   Could you add `-u` to detect typo in variable name?
   
   ```suggestion
   set -eux
   ```



##########
compose.yaml:
##########
@@ -64,3 +64,21 @@ services:
     environment:
       ARROW_GO_TESTCGO: "1"
     command: *go-command
+  debian-cgo-python:
+    # Usage:
+    #   docker compose build debian-cgo-python

Review Comment:
   ```suggestion
       #   docker compose build debian
       #   docker compose build debian-cgo-python
   ```



##########
ci/docker/debian-12-cgo-python.dockerfile:
##########


Review Comment:
   Could you remove the `-12` part?
   This doesn't depend on Debian version.



##########
ci/scripts/go_cgo_python_test.sh:
##########


Review Comment:
   Could you remove `go_` because it's redundant in this repository?



##########
ci/scripts/go_cgo_python_test.sh:
##########
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -ex
+
+source_dir=${1}
+
+if [ -n "${ARROW_PYTHON_VENV:-}" ]; then
+  # shellcheck disable=SC1091
+  . "${ARROW_PYTHON_VENV}/bin/activate"
+fi
+
+export GOFLAGS="${GOFLAGS} -gcflags=all=-d=checkptr"
+
+pushd "${source_dir}/arrow/cdata/test"
+
+case "$(uname)" in
+Linux)
+  testlib="cgotest.so"
+  ;;
+Darwin)
+  testlib="cgotest.so"
+  ;;
+MINGW*)
+  testlib="cgotest.dll"
+  ;;

Review Comment:
   How about the following? It aligns the Python implementation: 
https://github.com/apache/arrow-go/blob/3efb5f8480a73ee86e4948f2dfbf774e3c73a298/arrow/cdata/test/test_export_to_cgo.py#L30-L33
   
   ```suggestion
   MINGW*)
     testlib="cgotest.dll"
     ;;
   *)
     testlib="cgotest.so"
     ;;
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to