From 724510f2d92e15fdccb86ad7f07b0d75f39b41ec Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Wed, 28 Sep 2022 09:22:14 +0200 Subject: [PATCH 1/6] Change include directives --- python/pyarrow/src/api.h | 22 ++++++++--------- python/pyarrow/src/arrow_to_pandas.cc | 24 +++++++++---------- python/pyarrow/src/arrow_to_pandas.h | 4 ++-- python/pyarrow/src/arrow_to_python_internal.h | 4 ++-- python/pyarrow/src/benchmark.cc | 4 ++-- python/pyarrow/src/benchmark.h | 4 ++-- python/pyarrow/src/common.cc | 4 ++-- python/pyarrow/src/common.h | 4 ++-- python/pyarrow/src/csv.cc | 2 +- python/pyarrow/src/csv.h | 2 +- python/pyarrow/src/datetime.cc | 8 +++---- python/pyarrow/src/datetime.h | 4 ++-- python/pyarrow/src/decimal.cc | 6 ++--- python/pyarrow/src/decimal.h | 4 ++-- python/pyarrow/src/deserialize.cc | 16 ++++++------- python/pyarrow/src/deserialize.h | 6 ++--- python/pyarrow/src/extension_type.cc | 6 ++--- python/pyarrow/src/extension_type.h | 4 ++-- python/pyarrow/src/filesystem.cc | 2 +- python/pyarrow/src/filesystem.h | 4 ++-- python/pyarrow/src/flight.cc | 2 +- python/pyarrow/src/flight.h | 2 +- python/pyarrow/src/gdb.cc | 2 +- python/pyarrow/src/gdb.h | 2 +- python/pyarrow/src/helpers.cc | 8 +++---- python/pyarrow/src/helpers.h | 6 ++--- python/pyarrow/src/inference.cc | 14 +++++------ python/pyarrow/src/inference.h | 4 ++-- python/pyarrow/src/init.cc | 4 ++-- python/pyarrow/src/init.h | 4 ++-- python/pyarrow/src/io.cc | 4 ++-- python/pyarrow/src/io.h | 4 ++-- python/pyarrow/src/ipc.cc | 2 +- python/pyarrow/src/ipc.h | 4 ++-- python/pyarrow/src/iterators.h | 4 ++-- python/pyarrow/src/numpy_convert.cc | 10 ++++---- python/pyarrow/src/numpy_convert.h | 4 ++-- python/pyarrow/src/numpy_internal.h | 4 ++-- python/pyarrow/src/numpy_interop.h | 2 +- python/pyarrow/src/numpy_to_arrow.cc | 20 ++++++++-------- python/pyarrow/src/numpy_to_arrow.h | 4 ++-- python/pyarrow/src/parquet_encryption.cc | 2 +- python/pyarrow/src/parquet_encryption.h | 4 ++-- python/pyarrow/src/pch.h | 2 +- python/pyarrow/src/pyarrow.cc | 8 +++---- python/pyarrow/src/pyarrow.h | 4 ++-- python/pyarrow/src/python_to_arrow.cc | 18 +++++++------- python/pyarrow/src/python_to_arrow.h | 6 ++--- python/pyarrow/src/serialize.cc | 18 +++++++------- python/pyarrow/src/serialize.h | 2 +- python/pyarrow/src/type_traits.h | 4 ++-- python/pyarrow/src/udf.cc | 4 ++-- python/pyarrow/src/udf.h | 8 +++---- 53 files changed, 162 insertions(+), 162 deletions(-) diff --git a/python/pyarrow/src/api.h b/python/pyarrow/src/api.h index 28c46c95e947..316c22c7b078 100644 --- a/python/pyarrow/src/api.h +++ b/python/pyarrow/src/api.h @@ -17,14 +17,14 @@ #pragma once -#include "arrow_to_pandas.h" -#include "common.h" -#include "datetime.h" -#include "deserialize.h" -#include "helpers.h" -#include "inference.h" -#include "io.h" -#include "numpy_convert.h" -#include "numpy_to_arrow.h" -#include "python_to_arrow.h" -#include "serialize.h" +#include "pyarrow/arrow_to_pandas.h" +#include "pyarrow/common.h" +#include "pyarrow/datetime.h" +#include "pyarrow/deserialize.h" +#include "pyarrow/helpers.h" +#include "pyarrow/inference.h" +#include "pyarrow/io.h" +#include "pyarrow/numpy_convert.h" +#include "pyarrow/numpy_to_arrow.h" +#include "pyarrow/python_to_arrow.h" +#include "pyarrow/serialize.h" diff --git a/python/pyarrow/src/arrow_to_pandas.cc b/python/pyarrow/src/arrow_to_pandas.cc index ba67eb10553a..dea3dcafa59d 100644 --- a/python/pyarrow/src/arrow_to_pandas.cc +++ b/python/pyarrow/src/arrow_to_pandas.cc @@ -17,8 +17,8 @@ // Functions for pandas conversion via NumPy -#include "arrow_to_pandas.h" -#include "numpy_interop.h" // IWYU pragma: expand +#include "pyarrow/arrow_to_pandas.h" +#include "pyarrow/numpy_interop.h" // IWYU pragma: expand #include #include @@ -48,16 +48,16 @@ #include "arrow/compute/api.h" -#include "arrow_to_python_internal.h" -#include "common.h" -#include "datetime.h" -#include "decimal.h" -#include "helpers.h" -#include "numpy_convert.h" -#include "numpy_internal.h" -#include "pyarrow.h" -#include "python_to_arrow.h" -#include "type_traits.h" +#include "pyarrow/arrow_to_python_internal.h" +#include "pyarrow/common.h" +#include "pyarrow/datetime.h" +#include "pyarrow/decimal.h" +#include "pyarrow/helpers.h" +#include "pyarrow/numpy_convert.h" +#include "pyarrow/numpy_internal.h" +#include "pyarrow/pyarrow.h" +#include "pyarrow/python_to_arrow.h" +#include "pyarrow/type_traits.h" namespace arrow { diff --git a/python/pyarrow/src/arrow_to_pandas.h b/python/pyarrow/src/arrow_to_pandas.h index 33c08b6fe812..b8a3a3e596ee 100644 --- a/python/pyarrow/src/arrow_to_pandas.h +++ b/python/pyarrow/src/arrow_to_pandas.h @@ -20,14 +20,14 @@ #pragma once -#include "platform.h" +#include "pyarrow/platform.h" #include #include #include #include "arrow/memory_pool.h" -#include "visibility.h" +#include "pyarrow/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/arrow_to_python_internal.h b/python/pyarrow/src/arrow_to_python_internal.h index 251c2a38ca0c..18092bbba91e 100644 --- a/python/pyarrow/src/arrow_to_python_internal.h +++ b/python/pyarrow/src/arrow_to_python_internal.h @@ -17,8 +17,8 @@ #pragma once -#include "arrow/array.h" -#include "platform.h" +#include "pyarrow/arrow/array.h" +#include "pyarrow/platform.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/benchmark.cc b/python/pyarrow/src/benchmark.cc index 1e56552ed80b..1465f29ff928 100644 --- a/python/pyarrow/src/benchmark.cc +++ b/python/pyarrow/src/benchmark.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include "benchmark.h" -#include "helpers.h" +#include "pyarrow/benchmark.h" +#include "pyarrow/helpers.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/benchmark.h b/python/pyarrow/src/benchmark.h index 883f02fecebb..f4ce8d7ac752 100644 --- a/python/pyarrow/src/benchmark.h +++ b/python/pyarrow/src/benchmark.h @@ -17,9 +17,9 @@ #pragma once -#include "platform.h" +#include "pyarrow/platform.h" -#include "visibility.h" +#include "pyarrow/visibility.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/common.cc b/python/pyarrow/src/common.cc index 09dde3e44898..2bd54e86d9aa 100644 --- a/python/pyarrow/src/common.cc +++ b/python/pyarrow/src/common.cc @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#include "common.h" +#include "pyarrow/common.h" #include #include @@ -26,7 +26,7 @@ #include "arrow/util/checked_cast.h" #include "arrow/util/logging.h" -#include "helpers.h" +#include "pyarrow/helpers.h" namespace arrow { diff --git a/python/pyarrow/src/common.h b/python/pyarrow/src/common.h index 59f15c8a135f..0414962573a8 100644 --- a/python/pyarrow/src/common.h +++ b/python/pyarrow/src/common.h @@ -24,8 +24,8 @@ #include "arrow/buffer.h" #include "arrow/result.h" #include "arrow/util/macros.h" -#include "pyarrow.h" -#include "visibility.h" +#include "pyarrow/pyarrow.h" +#include "pyarrow/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/csv.cc b/python/pyarrow/src/csv.cc index 61ff23a22ed8..78ffb78dcdf2 100644 --- a/python/pyarrow/src/csv.cc +++ b/python/pyarrow/src/csv.cc @@ -19,7 +19,7 @@ #include -#include "common.h" +#include "pyarrow/common.h" namespace arrow { diff --git a/python/pyarrow/src/csv.h b/python/pyarrow/src/csv.h index e6e53af0f858..627ecea49325 100644 --- a/python/pyarrow/src/csv.h +++ b/python/pyarrow/src/csv.h @@ -24,7 +24,7 @@ #include "arrow/csv/options.h" #include "arrow/util/macros.h" -#include "common.h" +#include "pyarrow/common.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/datetime.cc b/python/pyarrow/src/datetime.cc index c4591ab50e00..b8bb28ad1ad7 100644 --- a/python/pyarrow/src/datetime.cc +++ b/python/pyarrow/src/datetime.cc @@ -27,10 +27,10 @@ #include "arrow/type.h" #include "arrow/util/logging.h" #include "arrow/util/value_parsing.h" -#include "arrow_to_python_internal.h" -#include "common.h" -#include "helpers.h" -#include "platform.h" +#include "pyarrow/arrow_to_python_internal.h" +#include "pyarrow/common.h" +#include "pyarrow/helpers.h" +#include "pyarrow/platform.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/datetime.h b/python/pyarrow/src/datetime.h index 6f9bfbe2dbfd..5fb5ed938e3e 100644 --- a/python/pyarrow/src/datetime.h +++ b/python/pyarrow/src/datetime.h @@ -20,12 +20,12 @@ #include #include -#include "platform.h" -#include "visibility.h" #include "arrow/status.h" #include "arrow/type.h" #include "arrow/type_fwd.h" #include "arrow/util/logging.h" +#include "pyarrow/platform.h" +#include "pyarrow/visibility.h" // By default, PyDateTimeAPI is a *static* variable. This forces // PyDateTime_IMPORT to be called in every C/C++ module using the diff --git a/python/pyarrow/src/decimal.cc b/python/pyarrow/src/decimal.cc index a7244f9dcc11..369130e36975 100644 --- a/python/pyarrow/src/decimal.cc +++ b/python/pyarrow/src/decimal.cc @@ -18,12 +18,12 @@ #include #include -#include "common.h" -#include "decimal.h" -#include "helpers.h" #include "arrow/type_fwd.h" #include "arrow/util/decimal.h" #include "arrow/util/logging.h" +#include "pyarrow/common.h" +#include "pyarrow/decimal.h" +#include "pyarrow/helpers.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/decimal.h b/python/pyarrow/src/decimal.h index 5c4a17dcd480..05a037bfa6b7 100644 --- a/python/pyarrow/src/decimal.h +++ b/python/pyarrow/src/decimal.h @@ -19,8 +19,8 @@ #include -#include "visibility.h" -#include "arrow/type.h" +#include "pyarrow/visibility.h" +#include "pyarrow/arrow/type.h" namespace arrow { diff --git a/python/pyarrow/src/deserialize.cc b/python/pyarrow/src/deserialize.cc index ad28874460a4..15951b9e36d6 100644 --- a/python/pyarrow/src/deserialize.cc +++ b/python/pyarrow/src/deserialize.cc @@ -15,9 +15,9 @@ // specific language governing permissions and limitations // under the License. -#include "deserialize.h" +#include "pyarrow/deserialize.h" -#include "numpy_interop.h" +#include "pyarrow/numpy_interop.h" #include #include @@ -40,12 +40,12 @@ #include "arrow/util/logging.h" #include "arrow/util/value_parsing.h" -#include "common.h" -#include "datetime.h" -#include "helpers.h" -#include "numpy_convert.h" -#include "pyarrow.h" -#include "serialize.h" +#include "pyarrow/common.h" +#include "pyarrow/datetime.h" +#include "pyarrow/helpers.h" +#include "pyarrow/numpy_convert.h" +#include "pyarrow/pyarrow.h" +#include "pyarrow/serialize.h" namespace arrow { diff --git a/python/pyarrow/src/deserialize.h b/python/pyarrow/src/deserialize.h index 08d0972048d1..f5fa97f302a9 100644 --- a/python/pyarrow/src/deserialize.h +++ b/python/pyarrow/src/deserialize.h @@ -21,9 +21,9 @@ #include #include -#include "serialize.h" -#include "visibility.h" -#include "arrow/status.h" +#include "pyarrow/serialize.h" +#include "pyarrow/visibility.h" +#include "pyarrow/arrow/status.h" namespace arrow { diff --git a/python/pyarrow/src/extension_type.cc b/python/pyarrow/src/extension_type.cc index 9fd2f2e1466d..7a2a87240ce6 100644 --- a/python/pyarrow/src/extension_type.cc +++ b/python/pyarrow/src/extension_type.cc @@ -19,11 +19,11 @@ #include #include -#include "extension_type.h" -#include "helpers.h" -#include "pyarrow.h" #include "arrow/util/checked_cast.h" #include "arrow/util/logging.h" +#include "pyarrow/extension_type.h" +#include "pyarrow/helpers.h" +#include "pyarrow/pyarrow.h" namespace arrow { diff --git a/python/pyarrow/src/extension_type.h b/python/pyarrow/src/extension_type.h index 76ddb3277338..0c97d01c5827 100644 --- a/python/pyarrow/src/extension_type.h +++ b/python/pyarrow/src/extension_type.h @@ -21,9 +21,9 @@ #include #include "arrow/extension_type.h" -#include "common.h" -#include "visibility.h" #include "arrow/util/macros.h" +#include "pyarrow/common.h" +#include "pyarrow/visibility.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/filesystem.cc b/python/pyarrow/src/filesystem.cc index 17ca732e073d..2a2e6b25536f 100644 --- a/python/pyarrow/src/filesystem.cc +++ b/python/pyarrow/src/filesystem.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include "filesystem.h" #include "arrow/util/logging.h" +#include "pyarrow/filesystem.h" namespace arrow { diff --git a/python/pyarrow/src/filesystem.h b/python/pyarrow/src/filesystem.h index 993145b53279..706591863463 100644 --- a/python/pyarrow/src/filesystem.h +++ b/python/pyarrow/src/filesystem.h @@ -22,9 +22,9 @@ #include #include "arrow/filesystem/filesystem.h" -#include "common.h" -#include "visibility.h" #include "arrow/util/macros.h" +#include "pyarrow/common.h" +#include "pyarrow/visibility.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/flight.cc b/python/pyarrow/src/flight.cc index 79b8db074a5e..cca8cbc75172 100644 --- a/python/pyarrow/src/flight.cc +++ b/python/pyarrow/src/flight.cc @@ -18,9 +18,9 @@ #include #include -#include "flight.h" #include "arrow/util/io_util.h" #include "arrow/util/logging.h" +#include "pyarrow/flight.h" using arrow::flight::FlightPayload; diff --git a/python/pyarrow/src/flight.h b/python/pyarrow/src/flight.h index 37bc1d1c9f28..10dc989633c3 100644 --- a/python/pyarrow/src/flight.h +++ b/python/pyarrow/src/flight.h @@ -23,7 +23,7 @@ #include "arrow/flight/api.h" #include "arrow/ipc/dictionary.h" -#include "common.h" +#include "pyarrow/common.h" #if defined(_WIN32) || defined(__CYGWIN__) // Windows #if defined(_MSC_VER) diff --git a/python/pyarrow/src/gdb.cc b/python/pyarrow/src/gdb.cc index 16530a032d71..b1b75e7f2afb 100644 --- a/python/pyarrow/src/gdb.cc +++ b/python/pyarrow/src/gdb.cc @@ -24,7 +24,6 @@ #include "arrow/datum.h" #include "arrow/extension_type.h" #include "arrow/ipc/json_simple.h" -#include "gdb.h" #include "arrow/record_batch.h" #include "arrow/scalar.h" #include "arrow/table.h" @@ -34,6 +33,7 @@ #include "arrow/util/key_value_metadata.h" #include "arrow/util/logging.h" #include "arrow/util/macros.h" +#include "pyarrow/gdb.h" namespace arrow { diff --git a/python/pyarrow/src/gdb.h b/python/pyarrow/src/gdb.h index b4296abe6ddc..a38784fee52b 100644 --- a/python/pyarrow/src/gdb.h +++ b/python/pyarrow/src/gdb.h @@ -17,7 +17,7 @@ #pragma once -#include "visibility.h" +#include "pyarrow/visibility.h" namespace arrow { namespace gdb { diff --git a/python/pyarrow/src/helpers.cc b/python/pyarrow/src/helpers.cc index 73d7cd8dcfc6..61f10a73a4d9 100644 --- a/python/pyarrow/src/helpers.cc +++ b/python/pyarrow/src/helpers.cc @@ -16,20 +16,20 @@ // under the License. // helpers.h includes a NumPy header, so we include this first -#include "numpy_interop.h" +#include "pyarrow/numpy_interop.h" -#include "helpers.h" +#include "pyarrow/helpers.h" #include #include #include #include -#include "common.h" -#include "decimal.h" #include "arrow/type_fwd.h" #include "arrow/util/checked_cast.h" #include "arrow/util/logging.h" +#include "pyarrow/common.h" +#include "pyarrow/decimal.h" namespace arrow { diff --git a/python/pyarrow/src/helpers.h b/python/pyarrow/src/helpers.h index 089d1225dd6a..fb09bfd29b06 100644 --- a/python/pyarrow/src/helpers.h +++ b/python/pyarrow/src/helpers.h @@ -17,20 +17,20 @@ #pragma once -#include "platform.h" +#include "pyarrow/platform.h" #include #include #include #include -#include "numpy_interop.h" +#include "pyarrow/numpy_interop.h" #include -#include "visibility.h" #include "arrow/type.h" #include "arrow/util/macros.h" +#include "pyarrow/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/inference.cc b/python/pyarrow/src/inference.cc index 513b0bfdbbbc..2b302ae0a281 100644 --- a/python/pyarrow/src/inference.cc +++ b/python/pyarrow/src/inference.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include "inference.h" -#include "numpy_interop.h" +#include "pyarrow/inference.h" +#include "pyarrow/numpy_interop.h" #include @@ -31,11 +31,11 @@ #include "arrow/util/decimal.h" #include "arrow/util/logging.h" -#include "datetime.h" -#include "decimal.h" -#include "helpers.h" -#include "iterators.h" -#include "numpy_convert.h" +#include "pyarrow/datetime.h" +#include "pyarrow/decimal.h" +#include "pyarrow/helpers.h" +#include "pyarrow/iterators.h" +#include "pyarrow/numpy_convert.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/inference.h b/python/pyarrow/src/inference.h index 24005dd96f15..6f5159a54ea3 100644 --- a/python/pyarrow/src/inference.h +++ b/python/pyarrow/src/inference.h @@ -20,13 +20,13 @@ #pragma once -#include "platform.h" +#include "pyarrow/platform.h" #include -#include "visibility.h" #include "arrow/type.h" #include "arrow/util/macros.h" +#include "pyarrow/visibility.h" #include "common.h" diff --git a/python/pyarrow/src/init.cc b/python/pyarrow/src/init.cc index f09c5cd12a5a..4fb6a94f3a57 100644 --- a/python/pyarrow/src/init.cc +++ b/python/pyarrow/src/init.cc @@ -18,7 +18,7 @@ // Trigger the array import (inversion of NO_IMPORT_ARRAY) #define NUMPY_IMPORT_ARRAY -#include "init.h" -#include "numpy_interop.h" +#include "pyarrow/init.h" +#include "pyarrow/numpy_interop.h" int arrow_init_numpy() { return arrow::py::import_numpy(); } diff --git a/python/pyarrow/src/init.h b/python/pyarrow/src/init.h index eab467b631e7..1c5be92ec85a 100644 --- a/python/pyarrow/src/init.h +++ b/python/pyarrow/src/init.h @@ -17,8 +17,8 @@ #pragma once -#include "platform.h" -#include "visibility.h" +#include "pyarrow/platform.h" +#include "pyarrow/visibility.h" extern "C" { ARROW_PYTHON_EXPORT diff --git a/python/pyarrow/src/io.cc b/python/pyarrow/src/io.cc index 0aa2c85939fa..796bff04c63d 100644 --- a/python/pyarrow/src/io.cc +++ b/python/pyarrow/src/io.cc @@ -28,8 +28,8 @@ #include "arrow/status.h" #include "arrow/util/logging.h" -#include "common.h" -#include "pyarrow.h" +#include "pyarrow/common.h" +#include "pyarrow/pyarrow.h" namespace arrow { diff --git a/python/pyarrow/src/io.h b/python/pyarrow/src/io.h index 9d79d566efeb..b7ee49d4bf65 100644 --- a/python/pyarrow/src/io.h +++ b/python/pyarrow/src/io.h @@ -22,8 +22,8 @@ #include "arrow/io/interfaces.h" #include "arrow/io/transform.h" -#include "common.h" -#include "visibility.h" +#include "pyarrow/common.h" +#include "pyarrow/visibility.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/ipc.cc b/python/pyarrow/src/ipc.cc index bed3da2d1ac5..5133481f8455 100644 --- a/python/pyarrow/src/ipc.cc +++ b/python/pyarrow/src/ipc.cc @@ -19,7 +19,7 @@ #include -#include "pyarrow.h" +#include "pyarrow/pyarrow.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/ipc.h b/python/pyarrow/src/ipc.h index 38839af82fd8..c4aa0938d6cc 100644 --- a/python/pyarrow/src/ipc.h +++ b/python/pyarrow/src/ipc.h @@ -19,11 +19,11 @@ #include -#include "common.h" -#include "visibility.h" #include "arrow/record_batch.h" #include "arrow/result.h" #include "arrow/util/macros.h" +#include "pyarrow/common.h" +#include "pyarrow/visibility.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/iterators.h b/python/pyarrow/src/iterators.h index d581adf52c96..35b83f3bad55 100644 --- a/python/pyarrow/src/iterators.h +++ b/python/pyarrow/src/iterators.h @@ -21,8 +21,8 @@ #include "arrow/array/array_primitive.h" -#include "common.h" -#include "numpy_internal.h" +#include "pyarrow/common.h" +#include "pyarrow/numpy_internal.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/numpy_convert.cc b/python/pyarrow/src/numpy_convert.cc index d8e10605daac..ff4ea5e1e8cb 100644 --- a/python/pyarrow/src/numpy_convert.cc +++ b/python/pyarrow/src/numpy_convert.cc @@ -15,9 +15,9 @@ // specific language governing permissions and limitations // under the License. -#include "numpy_interop.h" +#include "pyarrow/numpy_interop.h" -#include "numpy_convert.h" +#include "pyarrow/numpy_convert.h" #include #include @@ -30,9 +30,9 @@ #include "arrow/type.h" #include "arrow/util/logging.h" -#include "common.h" -#include "pyarrow.h" -#include "type_traits.h" +#include "pyarrow/common.h" +#include "pyarrow/pyarrow.h" +#include "pyarrow/type_traits.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/numpy_convert.h b/python/pyarrow/src/numpy_convert.h index d2772dcdcdf2..5aabbdfabeeb 100644 --- a/python/pyarrow/src/numpy_convert.h +++ b/python/pyarrow/src/numpy_convert.h @@ -20,15 +20,15 @@ #pragma once -#include "platform.h" +#include "pyarrow/platform.h" #include #include #include #include "arrow/buffer.h" -#include "visibility.h" #include "arrow/sparse_tensor.h" +#include "pyarrow/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/numpy_internal.h b/python/pyarrow/src/numpy_internal.h index d408e908442b..6758967da553 100644 --- a/python/pyarrow/src/numpy_internal.h +++ b/python/pyarrow/src/numpy_internal.h @@ -19,11 +19,11 @@ #pragma once -#include "numpy_interop.h" +#include "pyarrow/numpy_interop.h" #include "arrow/status.h" -#include "platform.h" +#include "pyarrow/platform.h" #include #include diff --git a/python/pyarrow/src/numpy_interop.h b/python/pyarrow/src/numpy_interop.h index d212e014ec6f..71c7c31792b7 100644 --- a/python/pyarrow/src/numpy_interop.h +++ b/python/pyarrow/src/numpy_interop.h @@ -17,7 +17,7 @@ #pragma once -#include "platform.h" // IWYU pragma: export +#include "pyarrow/platform.h" // IWYU pragma: export #include // IWYU pragma: export diff --git a/python/pyarrow/src/numpy_to_arrow.cc b/python/pyarrow/src/numpy_to_arrow.cc index cd01577d71dc..7f4b16f8392e 100644 --- a/python/pyarrow/src/numpy_to_arrow.cc +++ b/python/pyarrow/src/numpy_to_arrow.cc @@ -17,8 +17,8 @@ // Functions for pandas conversion via NumPy -#include "numpy_to_arrow.h" -#include "numpy_interop.h" +#include "pyarrow/numpy_to_arrow.h" +#include "pyarrow/numpy_interop.h" #include #include @@ -49,14 +49,14 @@ #include "arrow/compute/api_scalar.h" -#include "common.h" -#include "datetime.h" -#include "helpers.h" -#include "iterators.h" -#include "numpy_convert.h" -#include "numpy_internal.h" -#include "python_to_arrow.h" -#include "type_traits.h" +#include "pyarrow/common.h" +#include "pyarrow/datetime.h" +#include "pyarrow/helpers.h" +#include "pyarrow/iterators.h" +#include "pyarrow/numpy_convert.h" +#include "pyarrow/numpy_internal.h" +#include "pyarrow/python_to_arrow.h" +#include "pyarrow/type_traits.h" namespace arrow { diff --git a/python/pyarrow/src/numpy_to_arrow.h b/python/pyarrow/src/numpy_to_arrow.h index 13924b1ac1ca..66fcd72cf82e 100644 --- a/python/pyarrow/src/numpy_to_arrow.h +++ b/python/pyarrow/src/numpy_to_arrow.h @@ -19,12 +19,12 @@ #pragma once -#include "platform.h" +#include "pyarrow/platform.h" #include #include "arrow/compute/api.h" -#include "visibility.h" +#include "pyarrow/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/parquet_encryption.cc b/python/pyarrow/src/parquet_encryption.cc index b64c77f2b9fc..04adddbcd607 100644 --- a/python/pyarrow/src/parquet_encryption.cc +++ b/python/pyarrow/src/parquet_encryption.cc @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#include "parquet_encryption.h" +#include "pyarrow/parquet_encryption.h" #include "parquet/exception.h" namespace arrow { diff --git a/python/pyarrow/src/parquet_encryption.h b/python/pyarrow/src/parquet_encryption.h index 0079b6eed569..9064f2894b40 100644 --- a/python/pyarrow/src/parquet_encryption.h +++ b/python/pyarrow/src/parquet_encryption.h @@ -19,8 +19,8 @@ #include -#include "common.h" -#include "visibility.h" +#include "pyarrow/common.h" +#include "pyarrow/visibility.h" #include "arrow/util/macros.h" #include "parquet/encryption/crypto_factory.h" #include "parquet/encryption/kms_client.h" diff --git a/python/pyarrow/src/pch.h b/python/pyarrow/src/pch.h index 0afcf7938dfc..26f26b29cb9e 100644 --- a/python/pyarrow/src/pch.h +++ b/python/pyarrow/src/pch.h @@ -21,4 +21,4 @@ // may incur a slowdown, since it makes the precompiled header heavier to load. #include "arrow/pch.h" -#include "platform.h" +#include "pyarrow/platform.h" diff --git a/python/pyarrow/src/pyarrow.cc b/python/pyarrow/src/pyarrow.cc index b567a68df3e2..c1bd7883cc09 100644 --- a/python/pyarrow/src/pyarrow.cc +++ b/python/pyarrow/src/pyarrow.cc @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow.h" +#include "pyarrow/pyarrow.h" #include #include @@ -25,10 +25,10 @@ #include "arrow/tensor.h" #include "arrow/type.h" -#include "common.h" -#include "datetime.h" +#include "pyarrow/common.h" +#include "pyarrow/datetime.h" namespace { -#include "pyarrow_api.h" +#include "pyarrow/pyarrow_api.h" } namespace arrow { diff --git a/python/pyarrow/src/pyarrow.h b/python/pyarrow/src/pyarrow.h index a63e29a33fb7..0e84d49508a6 100644 --- a/python/pyarrow/src/pyarrow.h +++ b/python/pyarrow/src/pyarrow.h @@ -17,11 +17,11 @@ #pragma once -#include "platform.h" +#include "pyarrow/platform.h" #include -#include "visibility.h" +#include "pyarrow/visibility.h" #include "arrow/sparse_tensor.h" diff --git a/python/pyarrow/src/python_to_arrow.cc b/python/pyarrow/src/python_to_arrow.cc index 4ca19049a738..aa71269c6607 100644 --- a/python/pyarrow/src/python_to_arrow.cc +++ b/python/pyarrow/src/python_to_arrow.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include "python_to_arrow.h" -#include "numpy_interop.h" +#include "pyarrow/python_to_arrow.h" +#include "pyarrow/numpy_interop.h" #include @@ -44,14 +44,14 @@ #include "arrow/util/int_util_overflow.h" #include "arrow/util/logging.h" -#include "datetime.h" -#include "decimal.h" -#include "helpers.h" -#include "inference.h" -#include "iterators.h" -#include "numpy_convert.h" -#include "type_traits.h" #include "arrow/visit_type_inline.h" +#include "pyarrow/datetime.h" +#include "pyarrow/decimal.h" +#include "pyarrow/helpers.h" +#include "pyarrow/inference.h" +#include "pyarrow/iterators.h" +#include "pyarrow/numpy_convert.h" +#include "pyarrow/type_traits.h" namespace arrow { diff --git a/python/pyarrow/src/python_to_arrow.h b/python/pyarrow/src/python_to_arrow.h index ca246a87401e..be6fdb2b81e4 100644 --- a/python/pyarrow/src/python_to_arrow.h +++ b/python/pyarrow/src/python_to_arrow.h @@ -20,16 +20,16 @@ #pragma once -#include "platform.h" +#include "pyarrow/platform.h" #include #include -#include "visibility.h" #include "arrow/type.h" #include "arrow/util/macros.h" +#include "pyarrow/visibility.h" -#include "common.h" +#include "pyarrow/common.h" namespace arrow { diff --git a/python/pyarrow/src/serialize.cc b/python/pyarrow/src/serialize.cc index c7c925fa1980..c724160b0cd3 100644 --- a/python/pyarrow/src/serialize.cc +++ b/python/pyarrow/src/serialize.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include "serialize.h" -#include "numpy_interop.h" +#include "pyarrow/serialize.h" +#include "pyarrow/numpy_interop.h" #include #include @@ -42,13 +42,13 @@ #include "arrow/tensor.h" #include "arrow/util/logging.h" -#include "common.h" -#include "datetime.h" -#include "helpers.h" -#include "iterators.h" -#include "numpy_convert.h" -#include "platform.h" -#include "pyarrow.h" +#include "pyarrow/common.h" +#include "pyarrow/datetime.h" +#include "pyarrow/helpers.h" +#include "pyarrow/iterators.h" +#include "pyarrow/numpy_convert.h" +#include "pyarrow/platform.h" +#include "pyarrow/pyarrow.h" constexpr int32_t kMaxRecursionDepth = 100; diff --git a/python/pyarrow/src/serialize.h b/python/pyarrow/src/serialize.h index fd78c9a309ad..50b1dbd0c4df 100644 --- a/python/pyarrow/src/serialize.h +++ b/python/pyarrow/src/serialize.h @@ -21,9 +21,9 @@ #include #include "arrow/ipc/options.h" -#include "visibility.h" #include "arrow/sparse_tensor.h" #include "arrow/status.h" +#include "pyarrow/visibility.h" // Forward declaring PyObject, see // https://mail.python.org/pipermail/python-dev/2003-August/037601.html diff --git a/python/pyarrow/src/type_traits.h b/python/pyarrow/src/type_traits.h index 4cdfe9d8d62b..617acaab004d 100644 --- a/python/pyarrow/src/type_traits.h +++ b/python/pyarrow/src/type_traits.h @@ -19,12 +19,12 @@ #pragma once -#include "platform.h" +#include "pyarrow/platform.h" #include #include -#include "numpy_interop.h" +#include "pyarrow/numpy_interop.h" #include diff --git a/python/pyarrow/src/udf.cc b/python/pyarrow/src/udf.cc index 51cea5e6c64a..ab371e5cb9cc 100644 --- a/python/pyarrow/src/udf.cc +++ b/python/pyarrow/src/udf.cc @@ -15,9 +15,9 @@ // specific language governing permissions and limitations // under the License. -#include "udf.h" +#include "pyarrow/udf.h" #include "arrow/compute/function.h" -#include "common.h" +#include "pyarrow/common.h" namespace arrow { diff --git a/python/pyarrow/src/udf.h b/python/pyarrow/src/udf.h index a110440315ac..a785838bee3e 100644 --- a/python/pyarrow/src/udf.h +++ b/python/pyarrow/src/udf.h @@ -20,11 +20,11 @@ #include "arrow/compute/exec.h" #include "arrow/compute/function.h" #include "arrow/compute/registry.h" -#include "platform.h" +#include "pyarrow/platform.h" -#include "common.h" -#include "pyarrow.h" -#include "visibility.h" +#include "pyarrow/common.h" +#include "pyarrow/pyarrow.h" +#include "pyarrow/visibility.h" namespace arrow { From a715828767932b8769e7d4c8e6e73f88c49488f4 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Wed, 28 Sep 2022 15:52:27 +0200 Subject: [PATCH 2/6] Pass cmake for pyarrow cpp --- python/pyarrow/src/CMakeLists.txt | 51 +++++++++---------- python/pyarrow/src/{ => pyarrow}/api.h | 0 .../src/{ => pyarrow}/arrow_to_pandas.cc | 0 .../src/{ => pyarrow}/arrow_to_pandas.h | 0 .../{ => pyarrow}/arrow_to_python_internal.h | 2 +- python/pyarrow/src/{ => pyarrow}/benchmark.cc | 4 +- python/pyarrow/src/{ => pyarrow}/benchmark.h | 0 python/pyarrow/src/{ => pyarrow}/common.cc | 0 python/pyarrow/src/{ => pyarrow}/common.h | 0 python/pyarrow/src/{ => pyarrow}/csv.cc | 0 python/pyarrow/src/{ => pyarrow}/csv.h | 0 python/pyarrow/src/{ => pyarrow}/datetime.cc | 0 python/pyarrow/src/{ => pyarrow}/datetime.h | 0 python/pyarrow/src/{ => pyarrow}/decimal.cc | 0 python/pyarrow/src/{ => pyarrow}/decimal.h | 2 +- .../pyarrow/src/{ => pyarrow}/deserialize.cc | 0 .../pyarrow/src/{ => pyarrow}/deserialize.h | 2 +- .../src/{ => pyarrow}/extension_type.cc | 0 .../src/{ => pyarrow}/extension_type.h | 0 .../pyarrow/src/{ => pyarrow}/filesystem.cc | 0 python/pyarrow/src/{ => pyarrow}/filesystem.h | 0 python/pyarrow/src/{ => pyarrow}/flight.cc | 0 python/pyarrow/src/{ => pyarrow}/flight.h | 0 python/pyarrow/src/{ => pyarrow}/gdb.cc | 0 python/pyarrow/src/{ => pyarrow}/gdb.h | 0 python/pyarrow/src/{ => pyarrow}/helpers.cc | 0 python/pyarrow/src/{ => pyarrow}/helpers.h | 0 python/pyarrow/src/{ => pyarrow}/inference.cc | 0 python/pyarrow/src/{ => pyarrow}/inference.h | 0 python/pyarrow/src/{ => pyarrow}/init.cc | 0 python/pyarrow/src/{ => pyarrow}/init.h | 0 python/pyarrow/src/{ => pyarrow}/io.cc | 0 python/pyarrow/src/{ => pyarrow}/io.h | 0 python/pyarrow/src/{ => pyarrow}/ipc.cc | 0 python/pyarrow/src/{ => pyarrow}/ipc.h | 0 python/pyarrow/src/{ => pyarrow}/iterators.h | 0 .../src/{ => pyarrow}/numpy_convert.cc | 0 .../pyarrow/src/{ => pyarrow}/numpy_convert.h | 0 .../src/{ => pyarrow}/numpy_internal.h | 0 .../pyarrow/src/{ => pyarrow}/numpy_interop.h | 0 .../src/{ => pyarrow}/numpy_to_arrow.cc | 0 .../src/{ => pyarrow}/numpy_to_arrow.h | 0 .../src/{ => pyarrow}/parquet_encryption.cc | 0 .../src/{ => pyarrow}/parquet_encryption.h | 0 python/pyarrow/src/{ => pyarrow}/pch.h | 0 python/pyarrow/src/{ => pyarrow}/platform.h | 0 python/pyarrow/src/{ => pyarrow}/pyarrow.cc | 0 python/pyarrow/src/{ => pyarrow}/pyarrow.h | 0 .../pyarrow/src/{ => pyarrow}/pyarrow_api.h | 0 .../pyarrow/src/{ => pyarrow}/pyarrow_lib.h | 0 .../pyarrow/src/{ => pyarrow}/python_test.cc | 0 .../src/{ => pyarrow}/python_to_arrow.cc | 0 .../src/{ => pyarrow}/python_to_arrow.h | 0 python/pyarrow/src/{ => pyarrow}/serialize.cc | 0 python/pyarrow/src/{ => pyarrow}/serialize.h | 0 .../pyarrow/src/{ => pyarrow}/type_traits.h | 0 python/pyarrow/src/{ => pyarrow}/udf.cc | 0 python/pyarrow/src/{ => pyarrow}/udf.h | 0 python/pyarrow/src/{ => pyarrow}/visibility.h | 0 59 files changed, 30 insertions(+), 31 deletions(-) rename python/pyarrow/src/{ => pyarrow}/api.h (100%) rename python/pyarrow/src/{ => pyarrow}/arrow_to_pandas.cc (100%) rename python/pyarrow/src/{ => pyarrow}/arrow_to_pandas.h (100%) rename python/pyarrow/src/{ => pyarrow}/arrow_to_python_internal.h (98%) rename python/pyarrow/src/{ => pyarrow}/benchmark.cc (95%) rename python/pyarrow/src/{ => pyarrow}/benchmark.h (100%) rename python/pyarrow/src/{ => pyarrow}/common.cc (100%) rename python/pyarrow/src/{ => pyarrow}/common.h (100%) rename python/pyarrow/src/{ => pyarrow}/csv.cc (100%) rename python/pyarrow/src/{ => pyarrow}/csv.h (100%) rename python/pyarrow/src/{ => pyarrow}/datetime.cc (100%) rename python/pyarrow/src/{ => pyarrow}/datetime.h (100%) rename python/pyarrow/src/{ => pyarrow}/decimal.cc (100%) rename python/pyarrow/src/{ => pyarrow}/decimal.h (99%) rename python/pyarrow/src/{ => pyarrow}/deserialize.cc (100%) rename python/pyarrow/src/{ => pyarrow}/deserialize.h (99%) rename python/pyarrow/src/{ => pyarrow}/extension_type.cc (100%) rename python/pyarrow/src/{ => pyarrow}/extension_type.h (100%) rename python/pyarrow/src/{ => pyarrow}/filesystem.cc (100%) rename python/pyarrow/src/{ => pyarrow}/filesystem.h (100%) rename python/pyarrow/src/{ => pyarrow}/flight.cc (100%) rename python/pyarrow/src/{ => pyarrow}/flight.h (100%) rename python/pyarrow/src/{ => pyarrow}/gdb.cc (100%) rename python/pyarrow/src/{ => pyarrow}/gdb.h (100%) rename python/pyarrow/src/{ => pyarrow}/helpers.cc (100%) rename python/pyarrow/src/{ => pyarrow}/helpers.h (100%) rename python/pyarrow/src/{ => pyarrow}/inference.cc (100%) rename python/pyarrow/src/{ => pyarrow}/inference.h (100%) rename python/pyarrow/src/{ => pyarrow}/init.cc (100%) rename python/pyarrow/src/{ => pyarrow}/init.h (100%) rename python/pyarrow/src/{ => pyarrow}/io.cc (100%) rename python/pyarrow/src/{ => pyarrow}/io.h (100%) rename python/pyarrow/src/{ => pyarrow}/ipc.cc (100%) rename python/pyarrow/src/{ => pyarrow}/ipc.h (100%) rename python/pyarrow/src/{ => pyarrow}/iterators.h (100%) rename python/pyarrow/src/{ => pyarrow}/numpy_convert.cc (100%) rename python/pyarrow/src/{ => pyarrow}/numpy_convert.h (100%) rename python/pyarrow/src/{ => pyarrow}/numpy_internal.h (100%) rename python/pyarrow/src/{ => pyarrow}/numpy_interop.h (100%) rename python/pyarrow/src/{ => pyarrow}/numpy_to_arrow.cc (100%) rename python/pyarrow/src/{ => pyarrow}/numpy_to_arrow.h (100%) rename python/pyarrow/src/{ => pyarrow}/parquet_encryption.cc (100%) rename python/pyarrow/src/{ => pyarrow}/parquet_encryption.h (100%) rename python/pyarrow/src/{ => pyarrow}/pch.h (100%) rename python/pyarrow/src/{ => pyarrow}/platform.h (100%) rename python/pyarrow/src/{ => pyarrow}/pyarrow.cc (100%) rename python/pyarrow/src/{ => pyarrow}/pyarrow.h (100%) rename python/pyarrow/src/{ => pyarrow}/pyarrow_api.h (100%) rename python/pyarrow/src/{ => pyarrow}/pyarrow_lib.h (100%) rename python/pyarrow/src/{ => pyarrow}/python_test.cc (100%) rename python/pyarrow/src/{ => pyarrow}/python_to_arrow.cc (100%) rename python/pyarrow/src/{ => pyarrow}/python_to_arrow.h (100%) rename python/pyarrow/src/{ => pyarrow}/serialize.cc (100%) rename python/pyarrow/src/{ => pyarrow}/serialize.h (100%) rename python/pyarrow/src/{ => pyarrow}/type_traits.h (100%) rename python/pyarrow/src/{ => pyarrow}/udf.cc (100%) rename python/pyarrow/src/{ => pyarrow}/udf.h (100%) rename python/pyarrow/src/{ => pyarrow}/visibility.h (100%) diff --git a/python/pyarrow/src/CMakeLists.txt b/python/pyarrow/src/CMakeLists.txt index f60b3e67ece3..2b41c640dd8b 100644 --- a/python/pyarrow/src/CMakeLists.txt +++ b/python/pyarrow/src/CMakeLists.txt @@ -73,31 +73,30 @@ set(Python3_FIND_REGISTRY "LAST") set(Python3_FIND_FRAMEWORK "LAST") find_package(Python3Alt 3.7 REQUIRED) -include_directories(SYSTEM ${NUMPY_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${ARROW_INCLUDE_DIR} src) +include_directories(SYSTEM ${NUMPY_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${ARROW_INCLUDE_DIR} ${CMAKE_SOURCE_DIR} src) add_custom_target(arrow_python) set(ARROW_PYTHON_SRCS - arrow_to_pandas.cc - benchmark.cc - common.cc - datetime.cc - decimal.cc - deserialize.cc - extension_type.cc - gdb.cc - helpers.cc - inference.cc - init.cc - io.cc - ipc.cc - numpy_convert.cc - numpy_to_arrow.cc - python_test.cc - python_to_arrow.cc - pyarrow.cc - serialize.cc - udf.cc) + pyarrow/arrow_to_pandas.cc + pyarrow/benchmark.cc + pyarrow/common.cc + pyarrow/datetime.cc + pyarrow/decimal.cc + pyarrow/deserialize.cc + pyarrow/extension_type.cc + pyarrow/gdb.cc + pyarrow/helpers.cc + pyarrow/inference.cc + pyarrow/init.cc + pyarrow/io.cc + pyarrow/ipc.cc + pyarrow/numpy_convert.cc + pyarrow/numpy_to_arrow.cc + pyarrow/python_to_arrow.cc + pyarrow/pyarrow.cc + pyarrow/serialize.cc + pyarrow/udf.cc) set_source_files_properties(init.cc PROPERTIES SKIP_PRECOMPILE_HEADERS ON SKIP_UNITY_BUILD_INCLUSION ON) @@ -127,7 +126,7 @@ endif() if(PYARROW_WITH_PARQUET_ENCRYPTION) if(PARQUET_REQUIRE_ENCRYPTION) - list(APPEND ARROW_PYTHON_SRCS parquet_encryption.cc) + list(APPEND ARROW_PYTHON_SRCS pyarrow/parquet_encryption.cc) find_package(Parquet REQUIRED) list(APPEND ARROW_PYTHON_SHARED_LINK_LIBS Parquet::parquet_shared) list(APPEND ARROW_PYTHON_SHARED_INSTALL_INTERFACE_LIBS Parquet::parquet_shared) @@ -146,11 +145,11 @@ endif() # Check for only Arrow C++ options if(ARROW_CSV) - list(APPEND ARROW_PYTHON_SRCS csv.cc) + list(APPEND ARROW_PYTHON_SRCS pyarrow/csv.cc) endif() if(ARROW_FILESYSTEM) - list(APPEND ARROW_PYTHON_SRCS filesystem.cc) + list(APPEND ARROW_PYTHON_SRCS pyarrow/filesystem.cc) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") @@ -225,7 +224,7 @@ add_arrow_lib(arrow_python SOURCES ${ARROW_PYTHON_SRCS} PRECOMPILED_HEADERS - "$<$:pch.h>" + "$<$:pyarrow/pch.h>" OUTPUTS ARROW_PYTHON_LIBRARIES SHARED_LINK_FLAGS @@ -269,7 +268,7 @@ if(ARROW_FLIGHT AND ARROW_BUILD_SHARED) PKG_CONFIG_NAME arrow-python-flight SOURCES - flight.cc + pyarrow/flight.cc OUTPUTS ARROW_PYFLIGHT_LIBRARIES SHARED_LINK_FLAGS diff --git a/python/pyarrow/src/api.h b/python/pyarrow/src/pyarrow/api.h similarity index 100% rename from python/pyarrow/src/api.h rename to python/pyarrow/src/pyarrow/api.h diff --git a/python/pyarrow/src/arrow_to_pandas.cc b/python/pyarrow/src/pyarrow/arrow_to_pandas.cc similarity index 100% rename from python/pyarrow/src/arrow_to_pandas.cc rename to python/pyarrow/src/pyarrow/arrow_to_pandas.cc diff --git a/python/pyarrow/src/arrow_to_pandas.h b/python/pyarrow/src/pyarrow/arrow_to_pandas.h similarity index 100% rename from python/pyarrow/src/arrow_to_pandas.h rename to python/pyarrow/src/pyarrow/arrow_to_pandas.h diff --git a/python/pyarrow/src/arrow_to_python_internal.h b/python/pyarrow/src/pyarrow/arrow_to_python_internal.h similarity index 98% rename from python/pyarrow/src/arrow_to_python_internal.h rename to python/pyarrow/src/pyarrow/arrow_to_python_internal.h index 18092bbba91e..941490f915e5 100644 --- a/python/pyarrow/src/arrow_to_python_internal.h +++ b/python/pyarrow/src/pyarrow/arrow_to_python_internal.h @@ -17,7 +17,7 @@ #pragma once -#include "pyarrow/arrow/array.h" +#include "arrow/array.h" #include "pyarrow/platform.h" namespace arrow { diff --git a/python/pyarrow/src/benchmark.cc b/python/pyarrow/src/pyarrow/benchmark.cc similarity index 95% rename from python/pyarrow/src/benchmark.cc rename to python/pyarrow/src/pyarrow/benchmark.cc index 1465f29ff928..1336594420dd 100644 --- a/python/pyarrow/src/benchmark.cc +++ b/python/pyarrow/src/pyarrow/benchmark.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow/benchmark.h" -#include "pyarrow/helpers.h" +#include +#include namespace arrow { namespace py { diff --git a/python/pyarrow/src/benchmark.h b/python/pyarrow/src/pyarrow/benchmark.h similarity index 100% rename from python/pyarrow/src/benchmark.h rename to python/pyarrow/src/pyarrow/benchmark.h diff --git a/python/pyarrow/src/common.cc b/python/pyarrow/src/pyarrow/common.cc similarity index 100% rename from python/pyarrow/src/common.cc rename to python/pyarrow/src/pyarrow/common.cc diff --git a/python/pyarrow/src/common.h b/python/pyarrow/src/pyarrow/common.h similarity index 100% rename from python/pyarrow/src/common.h rename to python/pyarrow/src/pyarrow/common.h diff --git a/python/pyarrow/src/csv.cc b/python/pyarrow/src/pyarrow/csv.cc similarity index 100% rename from python/pyarrow/src/csv.cc rename to python/pyarrow/src/pyarrow/csv.cc diff --git a/python/pyarrow/src/csv.h b/python/pyarrow/src/pyarrow/csv.h similarity index 100% rename from python/pyarrow/src/csv.h rename to python/pyarrow/src/pyarrow/csv.h diff --git a/python/pyarrow/src/datetime.cc b/python/pyarrow/src/pyarrow/datetime.cc similarity index 100% rename from python/pyarrow/src/datetime.cc rename to python/pyarrow/src/pyarrow/datetime.cc diff --git a/python/pyarrow/src/datetime.h b/python/pyarrow/src/pyarrow/datetime.h similarity index 100% rename from python/pyarrow/src/datetime.h rename to python/pyarrow/src/pyarrow/datetime.h diff --git a/python/pyarrow/src/decimal.cc b/python/pyarrow/src/pyarrow/decimal.cc similarity index 100% rename from python/pyarrow/src/decimal.cc rename to python/pyarrow/src/pyarrow/decimal.cc diff --git a/python/pyarrow/src/decimal.h b/python/pyarrow/src/pyarrow/decimal.h similarity index 99% rename from python/pyarrow/src/decimal.h rename to python/pyarrow/src/pyarrow/decimal.h index 05a037bfa6b7..87a0b98f3836 100644 --- a/python/pyarrow/src/decimal.h +++ b/python/pyarrow/src/pyarrow/decimal.h @@ -20,7 +20,7 @@ #include #include "pyarrow/visibility.h" -#include "pyarrow/arrow/type.h" +#include "arrow/type.h" namespace arrow { diff --git a/python/pyarrow/src/deserialize.cc b/python/pyarrow/src/pyarrow/deserialize.cc similarity index 100% rename from python/pyarrow/src/deserialize.cc rename to python/pyarrow/src/pyarrow/deserialize.cc diff --git a/python/pyarrow/src/deserialize.h b/python/pyarrow/src/pyarrow/deserialize.h similarity index 99% rename from python/pyarrow/src/deserialize.h rename to python/pyarrow/src/pyarrow/deserialize.h index f5fa97f302a9..0af0814281c0 100644 --- a/python/pyarrow/src/deserialize.h +++ b/python/pyarrow/src/pyarrow/deserialize.h @@ -21,9 +21,9 @@ #include #include +#include "arrow/status.h" #include "pyarrow/serialize.h" #include "pyarrow/visibility.h" -#include "pyarrow/arrow/status.h" namespace arrow { diff --git a/python/pyarrow/src/extension_type.cc b/python/pyarrow/src/pyarrow/extension_type.cc similarity index 100% rename from python/pyarrow/src/extension_type.cc rename to python/pyarrow/src/pyarrow/extension_type.cc diff --git a/python/pyarrow/src/extension_type.h b/python/pyarrow/src/pyarrow/extension_type.h similarity index 100% rename from python/pyarrow/src/extension_type.h rename to python/pyarrow/src/pyarrow/extension_type.h diff --git a/python/pyarrow/src/filesystem.cc b/python/pyarrow/src/pyarrow/filesystem.cc similarity index 100% rename from python/pyarrow/src/filesystem.cc rename to python/pyarrow/src/pyarrow/filesystem.cc diff --git a/python/pyarrow/src/filesystem.h b/python/pyarrow/src/pyarrow/filesystem.h similarity index 100% rename from python/pyarrow/src/filesystem.h rename to python/pyarrow/src/pyarrow/filesystem.h diff --git a/python/pyarrow/src/flight.cc b/python/pyarrow/src/pyarrow/flight.cc similarity index 100% rename from python/pyarrow/src/flight.cc rename to python/pyarrow/src/pyarrow/flight.cc diff --git a/python/pyarrow/src/flight.h b/python/pyarrow/src/pyarrow/flight.h similarity index 100% rename from python/pyarrow/src/flight.h rename to python/pyarrow/src/pyarrow/flight.h diff --git a/python/pyarrow/src/gdb.cc b/python/pyarrow/src/pyarrow/gdb.cc similarity index 100% rename from python/pyarrow/src/gdb.cc rename to python/pyarrow/src/pyarrow/gdb.cc diff --git a/python/pyarrow/src/gdb.h b/python/pyarrow/src/pyarrow/gdb.h similarity index 100% rename from python/pyarrow/src/gdb.h rename to python/pyarrow/src/pyarrow/gdb.h diff --git a/python/pyarrow/src/helpers.cc b/python/pyarrow/src/pyarrow/helpers.cc similarity index 100% rename from python/pyarrow/src/helpers.cc rename to python/pyarrow/src/pyarrow/helpers.cc diff --git a/python/pyarrow/src/helpers.h b/python/pyarrow/src/pyarrow/helpers.h similarity index 100% rename from python/pyarrow/src/helpers.h rename to python/pyarrow/src/pyarrow/helpers.h diff --git a/python/pyarrow/src/inference.cc b/python/pyarrow/src/pyarrow/inference.cc similarity index 100% rename from python/pyarrow/src/inference.cc rename to python/pyarrow/src/pyarrow/inference.cc diff --git a/python/pyarrow/src/inference.h b/python/pyarrow/src/pyarrow/inference.h similarity index 100% rename from python/pyarrow/src/inference.h rename to python/pyarrow/src/pyarrow/inference.h diff --git a/python/pyarrow/src/init.cc b/python/pyarrow/src/pyarrow/init.cc similarity index 100% rename from python/pyarrow/src/init.cc rename to python/pyarrow/src/pyarrow/init.cc diff --git a/python/pyarrow/src/init.h b/python/pyarrow/src/pyarrow/init.h similarity index 100% rename from python/pyarrow/src/init.h rename to python/pyarrow/src/pyarrow/init.h diff --git a/python/pyarrow/src/io.cc b/python/pyarrow/src/pyarrow/io.cc similarity index 100% rename from python/pyarrow/src/io.cc rename to python/pyarrow/src/pyarrow/io.cc diff --git a/python/pyarrow/src/io.h b/python/pyarrow/src/pyarrow/io.h similarity index 100% rename from python/pyarrow/src/io.h rename to python/pyarrow/src/pyarrow/io.h diff --git a/python/pyarrow/src/ipc.cc b/python/pyarrow/src/pyarrow/ipc.cc similarity index 100% rename from python/pyarrow/src/ipc.cc rename to python/pyarrow/src/pyarrow/ipc.cc diff --git a/python/pyarrow/src/ipc.h b/python/pyarrow/src/pyarrow/ipc.h similarity index 100% rename from python/pyarrow/src/ipc.h rename to python/pyarrow/src/pyarrow/ipc.h diff --git a/python/pyarrow/src/iterators.h b/python/pyarrow/src/pyarrow/iterators.h similarity index 100% rename from python/pyarrow/src/iterators.h rename to python/pyarrow/src/pyarrow/iterators.h diff --git a/python/pyarrow/src/numpy_convert.cc b/python/pyarrow/src/pyarrow/numpy_convert.cc similarity index 100% rename from python/pyarrow/src/numpy_convert.cc rename to python/pyarrow/src/pyarrow/numpy_convert.cc diff --git a/python/pyarrow/src/numpy_convert.h b/python/pyarrow/src/pyarrow/numpy_convert.h similarity index 100% rename from python/pyarrow/src/numpy_convert.h rename to python/pyarrow/src/pyarrow/numpy_convert.h diff --git a/python/pyarrow/src/numpy_internal.h b/python/pyarrow/src/pyarrow/numpy_internal.h similarity index 100% rename from python/pyarrow/src/numpy_internal.h rename to python/pyarrow/src/pyarrow/numpy_internal.h diff --git a/python/pyarrow/src/numpy_interop.h b/python/pyarrow/src/pyarrow/numpy_interop.h similarity index 100% rename from python/pyarrow/src/numpy_interop.h rename to python/pyarrow/src/pyarrow/numpy_interop.h diff --git a/python/pyarrow/src/numpy_to_arrow.cc b/python/pyarrow/src/pyarrow/numpy_to_arrow.cc similarity index 100% rename from python/pyarrow/src/numpy_to_arrow.cc rename to python/pyarrow/src/pyarrow/numpy_to_arrow.cc diff --git a/python/pyarrow/src/numpy_to_arrow.h b/python/pyarrow/src/pyarrow/numpy_to_arrow.h similarity index 100% rename from python/pyarrow/src/numpy_to_arrow.h rename to python/pyarrow/src/pyarrow/numpy_to_arrow.h diff --git a/python/pyarrow/src/parquet_encryption.cc b/python/pyarrow/src/pyarrow/parquet_encryption.cc similarity index 100% rename from python/pyarrow/src/parquet_encryption.cc rename to python/pyarrow/src/pyarrow/parquet_encryption.cc diff --git a/python/pyarrow/src/parquet_encryption.h b/python/pyarrow/src/pyarrow/parquet_encryption.h similarity index 100% rename from python/pyarrow/src/parquet_encryption.h rename to python/pyarrow/src/pyarrow/parquet_encryption.h diff --git a/python/pyarrow/src/pch.h b/python/pyarrow/src/pyarrow/pch.h similarity index 100% rename from python/pyarrow/src/pch.h rename to python/pyarrow/src/pyarrow/pch.h diff --git a/python/pyarrow/src/platform.h b/python/pyarrow/src/pyarrow/platform.h similarity index 100% rename from python/pyarrow/src/platform.h rename to python/pyarrow/src/pyarrow/platform.h diff --git a/python/pyarrow/src/pyarrow.cc b/python/pyarrow/src/pyarrow/pyarrow.cc similarity index 100% rename from python/pyarrow/src/pyarrow.cc rename to python/pyarrow/src/pyarrow/pyarrow.cc diff --git a/python/pyarrow/src/pyarrow.h b/python/pyarrow/src/pyarrow/pyarrow.h similarity index 100% rename from python/pyarrow/src/pyarrow.h rename to python/pyarrow/src/pyarrow/pyarrow.h diff --git a/python/pyarrow/src/pyarrow_api.h b/python/pyarrow/src/pyarrow/pyarrow_api.h similarity index 100% rename from python/pyarrow/src/pyarrow_api.h rename to python/pyarrow/src/pyarrow/pyarrow_api.h diff --git a/python/pyarrow/src/pyarrow_lib.h b/python/pyarrow/src/pyarrow/pyarrow_lib.h similarity index 100% rename from python/pyarrow/src/pyarrow_lib.h rename to python/pyarrow/src/pyarrow/pyarrow_lib.h diff --git a/python/pyarrow/src/python_test.cc b/python/pyarrow/src/pyarrow/python_test.cc similarity index 100% rename from python/pyarrow/src/python_test.cc rename to python/pyarrow/src/pyarrow/python_test.cc diff --git a/python/pyarrow/src/python_to_arrow.cc b/python/pyarrow/src/pyarrow/python_to_arrow.cc similarity index 100% rename from python/pyarrow/src/python_to_arrow.cc rename to python/pyarrow/src/pyarrow/python_to_arrow.cc diff --git a/python/pyarrow/src/python_to_arrow.h b/python/pyarrow/src/pyarrow/python_to_arrow.h similarity index 100% rename from python/pyarrow/src/python_to_arrow.h rename to python/pyarrow/src/pyarrow/python_to_arrow.h diff --git a/python/pyarrow/src/serialize.cc b/python/pyarrow/src/pyarrow/serialize.cc similarity index 100% rename from python/pyarrow/src/serialize.cc rename to python/pyarrow/src/pyarrow/serialize.cc diff --git a/python/pyarrow/src/serialize.h b/python/pyarrow/src/pyarrow/serialize.h similarity index 100% rename from python/pyarrow/src/serialize.h rename to python/pyarrow/src/pyarrow/serialize.h diff --git a/python/pyarrow/src/type_traits.h b/python/pyarrow/src/pyarrow/type_traits.h similarity index 100% rename from python/pyarrow/src/type_traits.h rename to python/pyarrow/src/pyarrow/type_traits.h diff --git a/python/pyarrow/src/udf.cc b/python/pyarrow/src/pyarrow/udf.cc similarity index 100% rename from python/pyarrow/src/udf.cc rename to python/pyarrow/src/pyarrow/udf.cc diff --git a/python/pyarrow/src/udf.h b/python/pyarrow/src/pyarrow/udf.h similarity index 100% rename from python/pyarrow/src/udf.h rename to python/pyarrow/src/pyarrow/udf.h diff --git a/python/pyarrow/src/visibility.h b/python/pyarrow/src/pyarrow/visibility.h similarity index 100% rename from python/pyarrow/src/visibility.h rename to python/pyarrow/src/pyarrow/visibility.h From 40dc3b988697f9040c2be7e5d2731081f675f776 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Thu, 29 Sep 2022 12:54:31 +0200 Subject: [PATCH 3/6] Change the strategy and put PyArrow C++ inlcudes in a arrow/python subdirectory --- python/pyarrow/src/CMakeLists.txt | 50 +++++++++---------- .../pyarrow/src/arrow/python/CMakeLists.txt | 18 +++++++ .../src/{pyarrow => arrow/python}/api.h | 22 ++++---- .../python}/arrow_to_pandas.cc | 24 ++++----- .../python}/arrow_to_pandas.h | 4 +- .../python}/arrow_to_python_internal.h | 2 +- .../{pyarrow => arrow/python}/benchmark.cc | 4 +- .../src/{pyarrow => arrow/python}/benchmark.h | 4 +- .../src/{pyarrow => arrow/python}/common.cc | 4 +- .../src/{pyarrow => arrow/python}/common.h | 4 +- .../src/{pyarrow => arrow/python}/csv.cc | 2 +- .../src/{pyarrow => arrow/python}/csv.h | 2 +- .../src/{pyarrow => arrow/python}/datetime.cc | 8 +-- .../src/{pyarrow => arrow/python}/datetime.h | 4 +- .../src/{pyarrow => arrow/python}/decimal.cc | 6 +-- .../src/{pyarrow => arrow/python}/decimal.h | 2 +- .../{pyarrow => arrow/python}/deserialize.cc | 16 +++--- .../{pyarrow => arrow/python}/deserialize.h | 4 +- .../python}/extension_type.cc | 6 +-- .../python}/extension_type.h | 4 +- .../{pyarrow => arrow/python}/filesystem.cc | 2 +- .../{pyarrow => arrow/python}/filesystem.h | 4 +- .../src/{pyarrow => arrow/python}/flight.cc | 2 +- .../src/{pyarrow => arrow/python}/flight.h | 2 +- .../src/{pyarrow => arrow/python}/gdb.cc | 2 +- .../src/{pyarrow => arrow/python}/gdb.h | 2 +- .../src/{pyarrow => arrow/python}/helpers.cc | 8 +-- .../src/{pyarrow => arrow/python}/helpers.h | 6 +-- .../{pyarrow => arrow/python}/inference.cc | 14 +++--- .../src/{pyarrow => arrow/python}/inference.h | 4 +- .../src/{pyarrow => arrow/python}/init.cc | 4 +- .../src/{pyarrow => arrow/python}/init.h | 4 +- .../src/{pyarrow => arrow/python}/io.cc | 4 +- .../src/{pyarrow => arrow/python}/io.h | 4 +- .../src/{pyarrow => arrow/python}/ipc.cc | 2 +- .../src/{pyarrow => arrow/python}/ipc.h | 4 +- .../src/{pyarrow => arrow/python}/iterators.h | 4 +- .../python}/numpy_convert.cc | 10 ++-- .../{pyarrow => arrow/python}/numpy_convert.h | 4 +- .../python}/numpy_internal.h | 4 +- .../{pyarrow => arrow/python}/numpy_interop.h | 2 +- .../python}/numpy_to_arrow.cc | 20 ++++---- .../python}/numpy_to_arrow.h | 4 +- .../python}/parquet_encryption.cc | 2 +- .../python}/parquet_encryption.h | 4 +- .../src/{pyarrow => arrow/python}/pch.h | 2 +- .../src/{pyarrow => arrow/python}/platform.h | 0 .../src/{pyarrow => arrow/python}/pyarrow.cc | 8 +-- .../src/{pyarrow => arrow/python}/pyarrow.h | 4 +- .../{pyarrow => arrow/python}/pyarrow_api.h | 0 .../{pyarrow => arrow/python}/pyarrow_lib.h | 0 .../{pyarrow => arrow/python}/python_test.cc | 0 .../python}/python_to_arrow.cc | 18 +++---- .../python}/python_to_arrow.h | 6 +-- .../{pyarrow => arrow/python}/serialize.cc | 18 +++---- .../src/{pyarrow => arrow/python}/serialize.h | 2 +- .../{pyarrow => arrow/python}/type_traits.h | 4 +- .../src/{pyarrow => arrow/python}/udf.cc | 4 +- .../src/{pyarrow => arrow/python}/udf.h | 8 +-- .../{pyarrow => arrow/python}/visibility.h | 0 60 files changed, 202 insertions(+), 184 deletions(-) create mode 100644 python/pyarrow/src/arrow/python/CMakeLists.txt rename python/pyarrow/src/{pyarrow => arrow/python}/api.h (66%) rename python/pyarrow/src/{pyarrow => arrow/python}/arrow_to_pandas.cc (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/arrow_to_pandas.h (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/arrow_to_python_internal.h (97%) rename python/pyarrow/src/{pyarrow => arrow/python}/benchmark.cc (94%) rename python/pyarrow/src/{pyarrow => arrow/python}/benchmark.h (93%) rename python/pyarrow/src/{pyarrow => arrow/python}/common.cc (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/common.h (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/csv.cc (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/csv.h (97%) rename python/pyarrow/src/{pyarrow => arrow/python}/datetime.cc (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/datetime.h (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/decimal.cc (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/decimal.h (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/deserialize.cc (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/deserialize.h (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/extension_type.cc (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/extension_type.h (97%) rename python/pyarrow/src/{pyarrow => arrow/python}/filesystem.cc (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/filesystem.h (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/flight.cc (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/flight.h (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/gdb.cc (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/gdb.h (96%) rename python/pyarrow/src/{pyarrow => arrow/python}/helpers.cc (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/helpers.h (97%) rename python/pyarrow/src/{pyarrow => arrow/python}/inference.cc (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/inference.h (96%) rename python/pyarrow/src/{pyarrow => arrow/python}/init.cc (93%) rename python/pyarrow/src/{pyarrow => arrow/python}/init.h (92%) rename python/pyarrow/src/{pyarrow => arrow/python}/io.cc (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/io.h (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/ipc.cc (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/ipc.h (95%) rename python/pyarrow/src/{pyarrow => arrow/python}/iterators.h (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/numpy_convert.cc (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/numpy_convert.h (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/numpy_internal.h (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/numpy_interop.h (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/numpy_to_arrow.cc (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/numpy_to_arrow.h (97%) rename python/pyarrow/src/{pyarrow => arrow/python}/parquet_encryption.cc (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/parquet_encryption.h (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/pch.h (96%) rename python/pyarrow/src/{pyarrow => arrow/python}/platform.h (100%) rename python/pyarrow/src/{pyarrow => arrow/python}/pyarrow.cc (95%) rename python/pyarrow/src/{pyarrow => arrow/python}/pyarrow.h (97%) rename python/pyarrow/src/{pyarrow => arrow/python}/pyarrow_api.h (100%) rename python/pyarrow/src/{pyarrow => arrow/python}/pyarrow_lib.h (100%) rename python/pyarrow/src/{pyarrow => arrow/python}/python_test.cc (100%) rename python/pyarrow/src/{pyarrow => arrow/python}/python_to_arrow.cc (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/python_to_arrow.h (95%) rename python/pyarrow/src/{pyarrow => arrow/python}/serialize.cc (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/serialize.h (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/type_traits.h (99%) rename python/pyarrow/src/{pyarrow => arrow/python}/udf.cc (98%) rename python/pyarrow/src/{pyarrow => arrow/python}/udf.h (93%) rename python/pyarrow/src/{pyarrow => arrow/python}/visibility.h (100%) diff --git a/python/pyarrow/src/CMakeLists.txt b/python/pyarrow/src/CMakeLists.txt index 2b41c640dd8b..c109903696ea 100644 --- a/python/pyarrow/src/CMakeLists.txt +++ b/python/pyarrow/src/CMakeLists.txt @@ -78,25 +78,25 @@ include_directories(SYSTEM ${NUMPY_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${ARROW_ add_custom_target(arrow_python) set(ARROW_PYTHON_SRCS - pyarrow/arrow_to_pandas.cc - pyarrow/benchmark.cc - pyarrow/common.cc - pyarrow/datetime.cc - pyarrow/decimal.cc - pyarrow/deserialize.cc - pyarrow/extension_type.cc - pyarrow/gdb.cc - pyarrow/helpers.cc - pyarrow/inference.cc - pyarrow/init.cc - pyarrow/io.cc - pyarrow/ipc.cc - pyarrow/numpy_convert.cc - pyarrow/numpy_to_arrow.cc - pyarrow/python_to_arrow.cc - pyarrow/pyarrow.cc - pyarrow/serialize.cc - pyarrow/udf.cc) + arrow/python/arrow_to_pandas.cc + arrow/python/benchmark.cc + arrow/python/common.cc + arrow/python/datetime.cc + arrow/python/decimal.cc + arrow/python/deserialize.cc + arrow/python/extension_type.cc + arrow/python/gdb.cc + arrow/python/helpers.cc + arrow/python/inference.cc + arrow/python/init.cc + arrow/python/io.cc + arrow/python/ipc.cc + arrow/python/numpy_convert.cc + arrow/python/numpy_to_arrow.cc + arrow/python/python_to_arrow.cc + arrow/python/pyarrow.cc + arrow/python/serialize.cc + arrow/python/udf.cc) set_source_files_properties(init.cc PROPERTIES SKIP_PRECOMPILE_HEADERS ON SKIP_UNITY_BUILD_INCLUSION ON) @@ -126,7 +126,7 @@ endif() if(PYARROW_WITH_PARQUET_ENCRYPTION) if(PARQUET_REQUIRE_ENCRYPTION) - list(APPEND ARROW_PYTHON_SRCS pyarrow/parquet_encryption.cc) + list(APPEND ARROW_PYTHON_SRCS arrow/python/parquet_encryption.cc) find_package(Parquet REQUIRED) list(APPEND ARROW_PYTHON_SHARED_LINK_LIBS Parquet::parquet_shared) list(APPEND ARROW_PYTHON_SHARED_INSTALL_INTERFACE_LIBS Parquet::parquet_shared) @@ -145,11 +145,11 @@ endif() # Check for only Arrow C++ options if(ARROW_CSV) - list(APPEND ARROW_PYTHON_SRCS pyarrow/csv.cc) + list(APPEND ARROW_PYTHON_SRCS arrow/python/csv.cc) endif() if(ARROW_FILESYSTEM) - list(APPEND ARROW_PYTHON_SRCS pyarrow/filesystem.cc) + list(APPEND ARROW_PYTHON_SRCS arrow/python/filesystem.cc) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") @@ -224,7 +224,7 @@ add_arrow_lib(arrow_python SOURCES ${ARROW_PYTHON_SRCS} PRECOMPILED_HEADERS - "$<$:pyarrow/pch.h>" + "$<$:arrow/python/pch.h>" OUTPUTS ARROW_PYTHON_LIBRARIES SHARED_LINK_FLAGS @@ -268,7 +268,7 @@ if(ARROW_FLIGHT AND ARROW_BUILD_SHARED) PKG_CONFIG_NAME arrow-python-flight SOURCES - pyarrow/flight.cc + arrow/python/flight.cc OUTPUTS ARROW_PYFLIGHT_LIBRARIES SHARED_LINK_FLAGS @@ -308,4 +308,4 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL PROPERTY COMPILE_FLAGS -Wno-parentheses-equality) endif() -arrow_install_all_headers("arrow/python") +add_subdirectory(arrow/python) diff --git a/python/pyarrow/src/arrow/python/CMakeLists.txt b/python/pyarrow/src/arrow/python/CMakeLists.txt new file mode 100644 index 000000000000..ff355e46a4bd --- /dev/null +++ b/python/pyarrow/src/arrow/python/CMakeLists.txt @@ -0,0 +1,18 @@ +# 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. + +arrow_install_all_headers("arrow/python") diff --git a/python/pyarrow/src/pyarrow/api.h b/python/pyarrow/src/arrow/python/api.h similarity index 66% rename from python/pyarrow/src/pyarrow/api.h rename to python/pyarrow/src/arrow/python/api.h index 316c22c7b078..a0b13d6d1301 100644 --- a/python/pyarrow/src/pyarrow/api.h +++ b/python/pyarrow/src/arrow/python/api.h @@ -17,14 +17,14 @@ #pragma once -#include "pyarrow/arrow_to_pandas.h" -#include "pyarrow/common.h" -#include "pyarrow/datetime.h" -#include "pyarrow/deserialize.h" -#include "pyarrow/helpers.h" -#include "pyarrow/inference.h" -#include "pyarrow/io.h" -#include "pyarrow/numpy_convert.h" -#include "pyarrow/numpy_to_arrow.h" -#include "pyarrow/python_to_arrow.h" -#include "pyarrow/serialize.h" +#include "arrow/python/arrow_to_pandas.h" +#include "arrow/python/common.h" +#include "arrow/python/datetime.h" +#include "arrow/python/deserialize.h" +#include "arrow/python/helpers.h" +#include "arrow/python/inference.h" +#include "arrow/python/io.h" +#include "arrow/python/numpy_convert.h" +#include "arrow/python/numpy_to_arrow.h" +#include "arrow/python/python_to_arrow.h" +#include "arrow/python/serialize.h" diff --git a/python/pyarrow/src/pyarrow/arrow_to_pandas.cc b/python/pyarrow/src/arrow/python/arrow_to_pandas.cc similarity index 99% rename from python/pyarrow/src/pyarrow/arrow_to_pandas.cc rename to python/pyarrow/src/arrow/python/arrow_to_pandas.cc index dea3dcafa59d..af778f5a8fab 100644 --- a/python/pyarrow/src/pyarrow/arrow_to_pandas.cc +++ b/python/pyarrow/src/arrow/python/arrow_to_pandas.cc @@ -17,8 +17,8 @@ // Functions for pandas conversion via NumPy -#include "pyarrow/arrow_to_pandas.h" -#include "pyarrow/numpy_interop.h" // IWYU pragma: expand +#include "arrow/python/arrow_to_pandas.h" +#include "arrow/python/numpy_interop.h" // IWYU pragma: expand #include #include @@ -48,16 +48,16 @@ #include "arrow/compute/api.h" -#include "pyarrow/arrow_to_python_internal.h" -#include "pyarrow/common.h" -#include "pyarrow/datetime.h" -#include "pyarrow/decimal.h" -#include "pyarrow/helpers.h" -#include "pyarrow/numpy_convert.h" -#include "pyarrow/numpy_internal.h" -#include "pyarrow/pyarrow.h" -#include "pyarrow/python_to_arrow.h" -#include "pyarrow/type_traits.h" +#include "arrow/python/arrow_to_python_internal.h" +#include "arrow/python/common.h" +#include "arrow/python/datetime.h" +#include "arrow/python/decimal.h" +#include "arrow/python/helpers.h" +#include "arrow/python/numpy_convert.h" +#include "arrow/python/numpy_internal.h" +#include "arrow/python/pyarrow.h" +#include "arrow/python/python_to_arrow.h" +#include "arrow/python/type_traits.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/arrow_to_pandas.h b/python/pyarrow/src/arrow/python/arrow_to_pandas.h similarity index 98% rename from python/pyarrow/src/pyarrow/arrow_to_pandas.h rename to python/pyarrow/src/arrow/python/arrow_to_pandas.h index b8a3a3e596ee..6570364b8d2a 100644 --- a/python/pyarrow/src/pyarrow/arrow_to_pandas.h +++ b/python/pyarrow/src/arrow/python/arrow_to_pandas.h @@ -20,14 +20,14 @@ #pragma once -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" #include #include #include #include "arrow/memory_pool.h" -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/arrow_to_python_internal.h b/python/pyarrow/src/arrow/python/arrow_to_python_internal.h similarity index 97% rename from python/pyarrow/src/pyarrow/arrow_to_python_internal.h rename to python/pyarrow/src/arrow/python/arrow_to_python_internal.h index 941490f915e5..514cda320012 100644 --- a/python/pyarrow/src/pyarrow/arrow_to_python_internal.h +++ b/python/pyarrow/src/arrow/python/arrow_to_python_internal.h @@ -18,7 +18,7 @@ #pragma once #include "arrow/array.h" -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/benchmark.cc b/python/pyarrow/src/arrow/python/benchmark.cc similarity index 94% rename from python/pyarrow/src/pyarrow/benchmark.cc rename to python/pyarrow/src/arrow/python/benchmark.cc index 1336594420dd..2d29f69d25bd 100644 --- a/python/pyarrow/src/pyarrow/benchmark.cc +++ b/python/pyarrow/src/arrow/python/benchmark.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include -#include +#include +#include namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/benchmark.h b/python/pyarrow/src/arrow/python/benchmark.h similarity index 93% rename from python/pyarrow/src/pyarrow/benchmark.h rename to python/pyarrow/src/arrow/python/benchmark.h index f4ce8d7ac752..8060dd33722a 100644 --- a/python/pyarrow/src/pyarrow/benchmark.h +++ b/python/pyarrow/src/arrow/python/benchmark.h @@ -17,9 +17,9 @@ #pragma once -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/common.cc b/python/pyarrow/src/arrow/python/common.cc similarity index 98% rename from python/pyarrow/src/pyarrow/common.cc rename to python/pyarrow/src/arrow/python/common.cc index 2bd54e86d9aa..6fe2ed4dae32 100644 --- a/python/pyarrow/src/pyarrow/common.cc +++ b/python/pyarrow/src/arrow/python/common.cc @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow/common.h" +#include "arrow/python/common.h" #include #include @@ -26,7 +26,7 @@ #include "arrow/util/checked_cast.h" #include "arrow/util/logging.h" -#include "pyarrow/helpers.h" +#include "arrow/python/helpers.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/common.h b/python/pyarrow/src/arrow/python/common.h similarity index 99% rename from python/pyarrow/src/pyarrow/common.h rename to python/pyarrow/src/arrow/python/common.h index 0414962573a8..8c70e19e3160 100644 --- a/python/pyarrow/src/pyarrow/common.h +++ b/python/pyarrow/src/arrow/python/common.h @@ -24,8 +24,8 @@ #include "arrow/buffer.h" #include "arrow/result.h" #include "arrow/util/macros.h" -#include "pyarrow/pyarrow.h" -#include "pyarrow/visibility.h" +#include "arrow/python/pyarrow.h" +#include "arrow/python/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/csv.cc b/python/pyarrow/src/arrow/python/csv.cc similarity index 98% rename from python/pyarrow/src/pyarrow/csv.cc rename to python/pyarrow/src/arrow/python/csv.cc index 78ffb78dcdf2..1df3a94cef22 100644 --- a/python/pyarrow/src/pyarrow/csv.cc +++ b/python/pyarrow/src/arrow/python/csv.cc @@ -19,7 +19,7 @@ #include -#include "pyarrow/common.h" +#include "arrow/python/common.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/csv.h b/python/pyarrow/src/arrow/python/csv.h similarity index 97% rename from python/pyarrow/src/pyarrow/csv.h rename to python/pyarrow/src/arrow/python/csv.h index 627ecea49325..2295c49461ba 100644 --- a/python/pyarrow/src/pyarrow/csv.h +++ b/python/pyarrow/src/arrow/python/csv.h @@ -24,7 +24,7 @@ #include "arrow/csv/options.h" #include "arrow/util/macros.h" -#include "pyarrow/common.h" +#include "arrow/python/common.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/datetime.cc b/python/pyarrow/src/arrow/python/datetime.cc similarity index 99% rename from python/pyarrow/src/pyarrow/datetime.cc rename to python/pyarrow/src/arrow/python/datetime.cc index b8bb28ad1ad7..576d0d8a9302 100644 --- a/python/pyarrow/src/pyarrow/datetime.cc +++ b/python/pyarrow/src/arrow/python/datetime.cc @@ -27,10 +27,10 @@ #include "arrow/type.h" #include "arrow/util/logging.h" #include "arrow/util/value_parsing.h" -#include "pyarrow/arrow_to_python_internal.h" -#include "pyarrow/common.h" -#include "pyarrow/helpers.h" -#include "pyarrow/platform.h" +#include "arrow/python/arrow_to_python_internal.h" +#include "arrow/python/common.h" +#include "arrow/python/helpers.h" +#include "arrow/python/platform.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/datetime.h b/python/pyarrow/src/arrow/python/datetime.h similarity index 99% rename from python/pyarrow/src/pyarrow/datetime.h rename to python/pyarrow/src/arrow/python/datetime.h index 5fb5ed938e3e..ed3c4f68289d 100644 --- a/python/pyarrow/src/pyarrow/datetime.h +++ b/python/pyarrow/src/arrow/python/datetime.h @@ -24,8 +24,8 @@ #include "arrow/type.h" #include "arrow/type_fwd.h" #include "arrow/util/logging.h" -#include "pyarrow/platform.h" -#include "pyarrow/visibility.h" +#include "arrow/python/platform.h" +#include "arrow/python/visibility.h" // By default, PyDateTimeAPI is a *static* variable. This forces // PyDateTime_IMPORT to be called in every C/C++ module using the diff --git a/python/pyarrow/src/pyarrow/decimal.cc b/python/pyarrow/src/arrow/python/decimal.cc similarity index 98% rename from python/pyarrow/src/pyarrow/decimal.cc rename to python/pyarrow/src/arrow/python/decimal.cc index 369130e36975..46ad9bc70c51 100644 --- a/python/pyarrow/src/pyarrow/decimal.cc +++ b/python/pyarrow/src/arrow/python/decimal.cc @@ -21,9 +21,9 @@ #include "arrow/type_fwd.h" #include "arrow/util/decimal.h" #include "arrow/util/logging.h" -#include "pyarrow/common.h" -#include "pyarrow/decimal.h" -#include "pyarrow/helpers.h" +#include "arrow/python/common.h" +#include "arrow/python/decimal.h" +#include "arrow/python/helpers.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/decimal.h b/python/pyarrow/src/arrow/python/decimal.h similarity index 99% rename from python/pyarrow/src/pyarrow/decimal.h rename to python/pyarrow/src/arrow/python/decimal.h index 87a0b98f3836..1187037aed29 100644 --- a/python/pyarrow/src/pyarrow/decimal.h +++ b/python/pyarrow/src/arrow/python/decimal.h @@ -19,7 +19,7 @@ #include -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" #include "arrow/type.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/deserialize.cc b/python/pyarrow/src/arrow/python/deserialize.cc similarity index 98% rename from python/pyarrow/src/pyarrow/deserialize.cc rename to python/pyarrow/src/arrow/python/deserialize.cc index 15951b9e36d6..961a1686e0a8 100644 --- a/python/pyarrow/src/pyarrow/deserialize.cc +++ b/python/pyarrow/src/arrow/python/deserialize.cc @@ -15,9 +15,9 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow/deserialize.h" +#include "arrow/python/deserialize.h" -#include "pyarrow/numpy_interop.h" +#include "arrow/python/numpy_interop.h" #include #include @@ -40,12 +40,12 @@ #include "arrow/util/logging.h" #include "arrow/util/value_parsing.h" -#include "pyarrow/common.h" -#include "pyarrow/datetime.h" -#include "pyarrow/helpers.h" -#include "pyarrow/numpy_convert.h" -#include "pyarrow/pyarrow.h" -#include "pyarrow/serialize.h" +#include "arrow/python/common.h" +#include "arrow/python/datetime.h" +#include "arrow/python/helpers.h" +#include "arrow/python/numpy_convert.h" +#include "arrow/python/pyarrow.h" +#include "arrow/python/serialize.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/deserialize.h b/python/pyarrow/src/arrow/python/deserialize.h similarity index 98% rename from python/pyarrow/src/pyarrow/deserialize.h rename to python/pyarrow/src/arrow/python/deserialize.h index 0af0814281c0..ed8294231eea 100644 --- a/python/pyarrow/src/pyarrow/deserialize.h +++ b/python/pyarrow/src/arrow/python/deserialize.h @@ -22,8 +22,8 @@ #include #include "arrow/status.h" -#include "pyarrow/serialize.h" -#include "pyarrow/visibility.h" +#include "arrow/python/serialize.h" +#include "arrow/python/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/extension_type.cc b/python/pyarrow/src/arrow/python/extension_type.cc similarity index 98% rename from python/pyarrow/src/pyarrow/extension_type.cc rename to python/pyarrow/src/arrow/python/extension_type.cc index 7a2a87240ce6..6b3cb29ac252 100644 --- a/python/pyarrow/src/pyarrow/extension_type.cc +++ b/python/pyarrow/src/arrow/python/extension_type.cc @@ -21,9 +21,9 @@ #include "arrow/util/checked_cast.h" #include "arrow/util/logging.h" -#include "pyarrow/extension_type.h" -#include "pyarrow/helpers.h" -#include "pyarrow/pyarrow.h" +#include "arrow/python/extension_type.h" +#include "arrow/python/helpers.h" +#include "arrow/python/pyarrow.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/extension_type.h b/python/pyarrow/src/arrow/python/extension_type.h similarity index 97% rename from python/pyarrow/src/pyarrow/extension_type.h rename to python/pyarrow/src/arrow/python/extension_type.h index 0c97d01c5827..7fc86b99c962 100644 --- a/python/pyarrow/src/pyarrow/extension_type.h +++ b/python/pyarrow/src/arrow/python/extension_type.h @@ -22,8 +22,8 @@ #include "arrow/extension_type.h" #include "arrow/util/macros.h" -#include "pyarrow/common.h" -#include "pyarrow/visibility.h" +#include "arrow/python/common.h" +#include "arrow/python/visibility.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/filesystem.cc b/python/pyarrow/src/arrow/python/filesystem.cc similarity index 99% rename from python/pyarrow/src/pyarrow/filesystem.cc rename to python/pyarrow/src/arrow/python/filesystem.cc index 2a2e6b25536f..2ad76341f602 100644 --- a/python/pyarrow/src/pyarrow/filesystem.cc +++ b/python/pyarrow/src/arrow/python/filesystem.cc @@ -16,7 +16,7 @@ // under the License. #include "arrow/util/logging.h" -#include "pyarrow/filesystem.h" +#include "arrow/python/filesystem.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/filesystem.h b/python/pyarrow/src/arrow/python/filesystem.h similarity index 98% rename from python/pyarrow/src/pyarrow/filesystem.h rename to python/pyarrow/src/arrow/python/filesystem.h index 706591863463..2e5b2237bbed 100644 --- a/python/pyarrow/src/pyarrow/filesystem.h +++ b/python/pyarrow/src/arrow/python/filesystem.h @@ -23,8 +23,8 @@ #include "arrow/filesystem/filesystem.h" #include "arrow/util/macros.h" -#include "pyarrow/common.h" -#include "pyarrow/visibility.h" +#include "arrow/python/common.h" +#include "arrow/python/visibility.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/flight.cc b/python/pyarrow/src/arrow/python/flight.cc similarity index 99% rename from python/pyarrow/src/pyarrow/flight.cc rename to python/pyarrow/src/arrow/python/flight.cc index cca8cbc75172..6e266b7f9d89 100644 --- a/python/pyarrow/src/pyarrow/flight.cc +++ b/python/pyarrow/src/arrow/python/flight.cc @@ -20,7 +20,7 @@ #include "arrow/util/io_util.h" #include "arrow/util/logging.h" -#include "pyarrow/flight.h" +#include "arrow/python/flight.h" using arrow::flight::FlightPayload; diff --git a/python/pyarrow/src/pyarrow/flight.h b/python/pyarrow/src/arrow/python/flight.h similarity index 99% rename from python/pyarrow/src/pyarrow/flight.h rename to python/pyarrow/src/arrow/python/flight.h index 10dc989633c3..82d93711e55f 100644 --- a/python/pyarrow/src/pyarrow/flight.h +++ b/python/pyarrow/src/arrow/python/flight.h @@ -23,7 +23,7 @@ #include "arrow/flight/api.h" #include "arrow/ipc/dictionary.h" -#include "pyarrow/common.h" +#include "arrow/python/common.h" #if defined(_WIN32) || defined(__CYGWIN__) // Windows #if defined(_MSC_VER) diff --git a/python/pyarrow/src/pyarrow/gdb.cc b/python/pyarrow/src/arrow/python/gdb.cc similarity index 99% rename from python/pyarrow/src/pyarrow/gdb.cc rename to python/pyarrow/src/arrow/python/gdb.cc index b1b75e7f2afb..746fbdc1823b 100644 --- a/python/pyarrow/src/pyarrow/gdb.cc +++ b/python/pyarrow/src/arrow/python/gdb.cc @@ -33,7 +33,7 @@ #include "arrow/util/key_value_metadata.h" #include "arrow/util/logging.h" #include "arrow/util/macros.h" -#include "pyarrow/gdb.h" +#include "arrow/python/gdb.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/gdb.h b/python/pyarrow/src/arrow/python/gdb.h similarity index 96% rename from python/pyarrow/src/pyarrow/gdb.h rename to python/pyarrow/src/arrow/python/gdb.h index a38784fee52b..1ddcbb51f6e0 100644 --- a/python/pyarrow/src/pyarrow/gdb.h +++ b/python/pyarrow/src/arrow/python/gdb.h @@ -17,7 +17,7 @@ #pragma once -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" namespace arrow { namespace gdb { diff --git a/python/pyarrow/src/pyarrow/helpers.cc b/python/pyarrow/src/arrow/python/helpers.cc similarity index 99% rename from python/pyarrow/src/pyarrow/helpers.cc rename to python/pyarrow/src/arrow/python/helpers.cc index 61f10a73a4d9..5dd73a0d8d0f 100644 --- a/python/pyarrow/src/pyarrow/helpers.cc +++ b/python/pyarrow/src/arrow/python/helpers.cc @@ -16,9 +16,9 @@ // under the License. // helpers.h includes a NumPy header, so we include this first -#include "pyarrow/numpy_interop.h" +#include "arrow/python/numpy_interop.h" -#include "pyarrow/helpers.h" +#include "arrow/python/helpers.h" #include #include @@ -28,8 +28,8 @@ #include "arrow/type_fwd.h" #include "arrow/util/checked_cast.h" #include "arrow/util/logging.h" -#include "pyarrow/common.h" -#include "pyarrow/decimal.h" +#include "arrow/python/common.h" +#include "arrow/python/decimal.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/helpers.h b/python/pyarrow/src/arrow/python/helpers.h similarity index 97% rename from python/pyarrow/src/pyarrow/helpers.h rename to python/pyarrow/src/arrow/python/helpers.h index fb09bfd29b06..84455d2fe177 100644 --- a/python/pyarrow/src/pyarrow/helpers.h +++ b/python/pyarrow/src/arrow/python/helpers.h @@ -17,20 +17,20 @@ #pragma once -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" #include #include #include #include -#include "pyarrow/numpy_interop.h" +#include "arrow/python/numpy_interop.h" #include #include "arrow/type.h" #include "arrow/util/macros.h" -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/inference.cc b/python/pyarrow/src/arrow/python/inference.cc similarity index 98% rename from python/pyarrow/src/pyarrow/inference.cc rename to python/pyarrow/src/arrow/python/inference.cc index 2b302ae0a281..db5f0896a95b 100644 --- a/python/pyarrow/src/pyarrow/inference.cc +++ b/python/pyarrow/src/arrow/python/inference.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow/inference.h" -#include "pyarrow/numpy_interop.h" +#include "arrow/python/inference.h" +#include "arrow/python/numpy_interop.h" #include @@ -31,11 +31,11 @@ #include "arrow/util/decimal.h" #include "arrow/util/logging.h" -#include "pyarrow/datetime.h" -#include "pyarrow/decimal.h" -#include "pyarrow/helpers.h" -#include "pyarrow/iterators.h" -#include "pyarrow/numpy_convert.h" +#include "arrow/python/datetime.h" +#include "arrow/python/decimal.h" +#include "arrow/python/helpers.h" +#include "arrow/python/iterators.h" +#include "arrow/python/numpy_convert.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/inference.h b/python/pyarrow/src/arrow/python/inference.h similarity index 96% rename from python/pyarrow/src/pyarrow/inference.h rename to python/pyarrow/src/arrow/python/inference.h index 6f5159a54ea3..1d6516bcc72b 100644 --- a/python/pyarrow/src/pyarrow/inference.h +++ b/python/pyarrow/src/arrow/python/inference.h @@ -20,13 +20,13 @@ #pragma once -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" #include #include "arrow/type.h" #include "arrow/util/macros.h" -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" #include "common.h" diff --git a/python/pyarrow/src/pyarrow/init.cc b/python/pyarrow/src/arrow/python/init.cc similarity index 93% rename from python/pyarrow/src/pyarrow/init.cc rename to python/pyarrow/src/arrow/python/init.cc index 4fb6a94f3a57..dba293bbe236 100644 --- a/python/pyarrow/src/pyarrow/init.cc +++ b/python/pyarrow/src/arrow/python/init.cc @@ -18,7 +18,7 @@ // Trigger the array import (inversion of NO_IMPORT_ARRAY) #define NUMPY_IMPORT_ARRAY -#include "pyarrow/init.h" -#include "pyarrow/numpy_interop.h" +#include "arrow/python/init.h" +#include "arrow/python/numpy_interop.h" int arrow_init_numpy() { return arrow::py::import_numpy(); } diff --git a/python/pyarrow/src/pyarrow/init.h b/python/pyarrow/src/arrow/python/init.h similarity index 92% rename from python/pyarrow/src/pyarrow/init.h rename to python/pyarrow/src/arrow/python/init.h index 1c5be92ec85a..2e6c954862bd 100644 --- a/python/pyarrow/src/pyarrow/init.h +++ b/python/pyarrow/src/arrow/python/init.h @@ -17,8 +17,8 @@ #pragma once -#include "pyarrow/platform.h" -#include "pyarrow/visibility.h" +#include "arrow/python/platform.h" +#include "arrow/python/visibility.h" extern "C" { ARROW_PYTHON_EXPORT diff --git a/python/pyarrow/src/pyarrow/io.cc b/python/pyarrow/src/arrow/python/io.cc similarity index 99% rename from python/pyarrow/src/pyarrow/io.cc rename to python/pyarrow/src/arrow/python/io.cc index 796bff04c63d..43f8297c5a7e 100644 --- a/python/pyarrow/src/pyarrow/io.cc +++ b/python/pyarrow/src/arrow/python/io.cc @@ -28,8 +28,8 @@ #include "arrow/status.h" #include "arrow/util/logging.h" -#include "pyarrow/common.h" -#include "pyarrow/pyarrow.h" +#include "arrow/python/common.h" +#include "arrow/python/pyarrow.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/io.h b/python/pyarrow/src/arrow/python/io.h similarity index 98% rename from python/pyarrow/src/pyarrow/io.h rename to python/pyarrow/src/arrow/python/io.h index b7ee49d4bf65..10489c1351b5 100644 --- a/python/pyarrow/src/pyarrow/io.h +++ b/python/pyarrow/src/arrow/python/io.h @@ -22,8 +22,8 @@ #include "arrow/io/interfaces.h" #include "arrow/io/transform.h" -#include "pyarrow/common.h" -#include "pyarrow/visibility.h" +#include "arrow/python/common.h" +#include "arrow/python/visibility.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/ipc.cc b/python/pyarrow/src/arrow/python/ipc.cc similarity index 98% rename from python/pyarrow/src/pyarrow/ipc.cc rename to python/pyarrow/src/arrow/python/ipc.cc index 5133481f8455..93481822475d 100644 --- a/python/pyarrow/src/pyarrow/ipc.cc +++ b/python/pyarrow/src/arrow/python/ipc.cc @@ -19,7 +19,7 @@ #include -#include "pyarrow/pyarrow.h" +#include "arrow/python/pyarrow.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/ipc.h b/python/pyarrow/src/arrow/python/ipc.h similarity index 95% rename from python/pyarrow/src/pyarrow/ipc.h rename to python/pyarrow/src/arrow/python/ipc.h index c4aa0938d6cc..57eabfed0505 100644 --- a/python/pyarrow/src/pyarrow/ipc.h +++ b/python/pyarrow/src/arrow/python/ipc.h @@ -22,8 +22,8 @@ #include "arrow/record_batch.h" #include "arrow/result.h" #include "arrow/util/macros.h" -#include "pyarrow/common.h" -#include "pyarrow/visibility.h" +#include "arrow/python/common.h" +#include "arrow/python/visibility.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/iterators.h b/python/pyarrow/src/arrow/python/iterators.h similarity index 98% rename from python/pyarrow/src/pyarrow/iterators.h rename to python/pyarrow/src/arrow/python/iterators.h index 35b83f3bad55..7b31962dac5b 100644 --- a/python/pyarrow/src/pyarrow/iterators.h +++ b/python/pyarrow/src/arrow/python/iterators.h @@ -21,8 +21,8 @@ #include "arrow/array/array_primitive.h" -#include "pyarrow/common.h" -#include "pyarrow/numpy_internal.h" +#include "arrow/python/common.h" +#include "arrow/python/numpy_internal.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/numpy_convert.cc b/python/pyarrow/src/arrow/python/numpy_convert.cc similarity index 99% rename from python/pyarrow/src/pyarrow/numpy_convert.cc rename to python/pyarrow/src/arrow/python/numpy_convert.cc index ff4ea5e1e8cb..49706807644d 100644 --- a/python/pyarrow/src/pyarrow/numpy_convert.cc +++ b/python/pyarrow/src/arrow/python/numpy_convert.cc @@ -15,9 +15,9 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow/numpy_interop.h" +#include "arrow/python/numpy_interop.h" -#include "pyarrow/numpy_convert.h" +#include "arrow/python/numpy_convert.h" #include #include @@ -30,9 +30,9 @@ #include "arrow/type.h" #include "arrow/util/logging.h" -#include "pyarrow/common.h" -#include "pyarrow/pyarrow.h" -#include "pyarrow/type_traits.h" +#include "arrow/python/common.h" +#include "arrow/python/pyarrow.h" +#include "arrow/python/type_traits.h" namespace arrow { namespace py { diff --git a/python/pyarrow/src/pyarrow/numpy_convert.h b/python/pyarrow/src/arrow/python/numpy_convert.h similarity index 98% rename from python/pyarrow/src/pyarrow/numpy_convert.h rename to python/pyarrow/src/arrow/python/numpy_convert.h index 5aabbdfabeeb..69a7dd3323b0 100644 --- a/python/pyarrow/src/pyarrow/numpy_convert.h +++ b/python/pyarrow/src/arrow/python/numpy_convert.h @@ -20,7 +20,7 @@ #pragma once -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" #include #include @@ -28,7 +28,7 @@ #include "arrow/buffer.h" #include "arrow/sparse_tensor.h" -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/numpy_internal.h b/python/pyarrow/src/arrow/python/numpy_internal.h similarity index 98% rename from python/pyarrow/src/pyarrow/numpy_internal.h rename to python/pyarrow/src/arrow/python/numpy_internal.h index 6758967da553..b9b632f9f9a1 100644 --- a/python/pyarrow/src/pyarrow/numpy_internal.h +++ b/python/pyarrow/src/arrow/python/numpy_internal.h @@ -19,11 +19,11 @@ #pragma once -#include "pyarrow/numpy_interop.h" +#include "arrow/python/numpy_interop.h" #include "arrow/status.h" -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" #include #include diff --git a/python/pyarrow/src/pyarrow/numpy_interop.h b/python/pyarrow/src/arrow/python/numpy_interop.h similarity index 98% rename from python/pyarrow/src/pyarrow/numpy_interop.h rename to python/pyarrow/src/arrow/python/numpy_interop.h index 71c7c31792b7..ce7baed259f9 100644 --- a/python/pyarrow/src/pyarrow/numpy_interop.h +++ b/python/pyarrow/src/arrow/python/numpy_interop.h @@ -17,7 +17,7 @@ #pragma once -#include "pyarrow/platform.h" // IWYU pragma: export +#include "arrow/python/platform.h" // IWYU pragma: export #include // IWYU pragma: export diff --git a/python/pyarrow/src/pyarrow/numpy_to_arrow.cc b/python/pyarrow/src/arrow/python/numpy_to_arrow.cc similarity index 98% rename from python/pyarrow/src/pyarrow/numpy_to_arrow.cc rename to python/pyarrow/src/arrow/python/numpy_to_arrow.cc index 7f4b16f8392e..2727ce32f449 100644 --- a/python/pyarrow/src/pyarrow/numpy_to_arrow.cc +++ b/python/pyarrow/src/arrow/python/numpy_to_arrow.cc @@ -17,8 +17,8 @@ // Functions for pandas conversion via NumPy -#include "pyarrow/numpy_to_arrow.h" -#include "pyarrow/numpy_interop.h" +#include "arrow/python/numpy_to_arrow.h" +#include "arrow/python/numpy_interop.h" #include #include @@ -49,14 +49,14 @@ #include "arrow/compute/api_scalar.h" -#include "pyarrow/common.h" -#include "pyarrow/datetime.h" -#include "pyarrow/helpers.h" -#include "pyarrow/iterators.h" -#include "pyarrow/numpy_convert.h" -#include "pyarrow/numpy_internal.h" -#include "pyarrow/python_to_arrow.h" -#include "pyarrow/type_traits.h" +#include "arrow/python/common.h" +#include "arrow/python/datetime.h" +#include "arrow/python/helpers.h" +#include "arrow/python/iterators.h" +#include "arrow/python/numpy_convert.h" +#include "arrow/python/numpy_internal.h" +#include "arrow/python/python_to_arrow.h" +#include "arrow/python/type_traits.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/numpy_to_arrow.h b/python/pyarrow/src/arrow/python/numpy_to_arrow.h similarity index 97% rename from python/pyarrow/src/pyarrow/numpy_to_arrow.h rename to python/pyarrow/src/arrow/python/numpy_to_arrow.h index 66fcd72cf82e..b6cd093e5542 100644 --- a/python/pyarrow/src/pyarrow/numpy_to_arrow.h +++ b/python/pyarrow/src/arrow/python/numpy_to_arrow.h @@ -19,12 +19,12 @@ #pragma once -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" #include #include "arrow/compute/api.h" -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/parquet_encryption.cc b/python/pyarrow/src/arrow/python/parquet_encryption.cc similarity index 98% rename from python/pyarrow/src/pyarrow/parquet_encryption.cc rename to python/pyarrow/src/arrow/python/parquet_encryption.cc index 04adddbcd607..a5f924bce783 100644 --- a/python/pyarrow/src/pyarrow/parquet_encryption.cc +++ b/python/pyarrow/src/arrow/python/parquet_encryption.cc @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow/parquet_encryption.h" +#include "arrow/python/parquet_encryption.h" #include "parquet/exception.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/parquet_encryption.h b/python/pyarrow/src/arrow/python/parquet_encryption.h similarity index 98% rename from python/pyarrow/src/pyarrow/parquet_encryption.h rename to python/pyarrow/src/arrow/python/parquet_encryption.h index 9064f2894b40..23ee478348ec 100644 --- a/python/pyarrow/src/pyarrow/parquet_encryption.h +++ b/python/pyarrow/src/arrow/python/parquet_encryption.h @@ -19,8 +19,8 @@ #include -#include "pyarrow/common.h" -#include "pyarrow/visibility.h" +#include "arrow/python/common.h" +#include "arrow/python/visibility.h" #include "arrow/util/macros.h" #include "parquet/encryption/crypto_factory.h" #include "parquet/encryption/kms_client.h" diff --git a/python/pyarrow/src/pyarrow/pch.h b/python/pyarrow/src/arrow/python/pch.h similarity index 96% rename from python/pyarrow/src/pyarrow/pch.h rename to python/pyarrow/src/arrow/python/pch.h index 26f26b29cb9e..d1d688b4f17c 100644 --- a/python/pyarrow/src/pyarrow/pch.h +++ b/python/pyarrow/src/arrow/python/pch.h @@ -21,4 +21,4 @@ // may incur a slowdown, since it makes the precompiled header heavier to load. #include "arrow/pch.h" -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" diff --git a/python/pyarrow/src/pyarrow/platform.h b/python/pyarrow/src/arrow/python/platform.h similarity index 100% rename from python/pyarrow/src/pyarrow/platform.h rename to python/pyarrow/src/arrow/python/platform.h diff --git a/python/pyarrow/src/pyarrow/pyarrow.cc b/python/pyarrow/src/arrow/python/pyarrow.cc similarity index 95% rename from python/pyarrow/src/pyarrow/pyarrow.cc rename to python/pyarrow/src/arrow/python/pyarrow.cc index c1bd7883cc09..c3244b74bf51 100644 --- a/python/pyarrow/src/pyarrow/pyarrow.cc +++ b/python/pyarrow/src/arrow/python/pyarrow.cc @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow/pyarrow.h" +#include "arrow/python/pyarrow.h" #include #include @@ -25,10 +25,10 @@ #include "arrow/tensor.h" #include "arrow/type.h" -#include "pyarrow/common.h" -#include "pyarrow/datetime.h" +#include "arrow/python/common.h" +#include "arrow/python/datetime.h" namespace { -#include "pyarrow/pyarrow_api.h" +#include "arrow/python/pyarrow_api.h" } namespace arrow { diff --git a/python/pyarrow/src/pyarrow/pyarrow.h b/python/pyarrow/src/arrow/python/pyarrow.h similarity index 97% rename from python/pyarrow/src/pyarrow/pyarrow.h rename to python/pyarrow/src/arrow/python/pyarrow.h index 0e84d49508a6..4c365081d70c 100644 --- a/python/pyarrow/src/pyarrow/pyarrow.h +++ b/python/pyarrow/src/arrow/python/pyarrow.h @@ -17,11 +17,11 @@ #pragma once -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" #include -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" #include "arrow/sparse_tensor.h" diff --git a/python/pyarrow/src/pyarrow/pyarrow_api.h b/python/pyarrow/src/arrow/python/pyarrow_api.h similarity index 100% rename from python/pyarrow/src/pyarrow/pyarrow_api.h rename to python/pyarrow/src/arrow/python/pyarrow_api.h diff --git a/python/pyarrow/src/pyarrow/pyarrow_lib.h b/python/pyarrow/src/arrow/python/pyarrow_lib.h similarity index 100% rename from python/pyarrow/src/pyarrow/pyarrow_lib.h rename to python/pyarrow/src/arrow/python/pyarrow_lib.h diff --git a/python/pyarrow/src/pyarrow/python_test.cc b/python/pyarrow/src/arrow/python/python_test.cc similarity index 100% rename from python/pyarrow/src/pyarrow/python_test.cc rename to python/pyarrow/src/arrow/python/python_test.cc diff --git a/python/pyarrow/src/pyarrow/python_to_arrow.cc b/python/pyarrow/src/arrow/python/python_to_arrow.cc similarity index 99% rename from python/pyarrow/src/pyarrow/python_to_arrow.cc rename to python/pyarrow/src/arrow/python/python_to_arrow.cc index aa71269c6607..3a43caed11fa 100644 --- a/python/pyarrow/src/pyarrow/python_to_arrow.cc +++ b/python/pyarrow/src/arrow/python/python_to_arrow.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow/python_to_arrow.h" -#include "pyarrow/numpy_interop.h" +#include "arrow/python/python_to_arrow.h" +#include "arrow/python/numpy_interop.h" #include @@ -45,13 +45,13 @@ #include "arrow/util/logging.h" #include "arrow/visit_type_inline.h" -#include "pyarrow/datetime.h" -#include "pyarrow/decimal.h" -#include "pyarrow/helpers.h" -#include "pyarrow/inference.h" -#include "pyarrow/iterators.h" -#include "pyarrow/numpy_convert.h" -#include "pyarrow/type_traits.h" +#include "arrow/python/datetime.h" +#include "arrow/python/decimal.h" +#include "arrow/python/helpers.h" +#include "arrow/python/inference.h" +#include "arrow/python/iterators.h" +#include "arrow/python/numpy_convert.h" +#include "arrow/python/type_traits.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/python_to_arrow.h b/python/pyarrow/src/arrow/python/python_to_arrow.h similarity index 95% rename from python/pyarrow/src/pyarrow/python_to_arrow.h rename to python/pyarrow/src/arrow/python/python_to_arrow.h index be6fdb2b81e4..d737047a00b8 100644 --- a/python/pyarrow/src/pyarrow/python_to_arrow.h +++ b/python/pyarrow/src/arrow/python/python_to_arrow.h @@ -20,16 +20,16 @@ #pragma once -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" #include #include #include "arrow/type.h" #include "arrow/util/macros.h" -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" -#include "pyarrow/common.h" +#include "arrow/python/common.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/serialize.cc b/python/pyarrow/src/arrow/python/serialize.cc similarity index 99% rename from python/pyarrow/src/pyarrow/serialize.cc rename to python/pyarrow/src/arrow/python/serialize.cc index c724160b0cd3..ad079cbd9c70 100644 --- a/python/pyarrow/src/pyarrow/serialize.cc +++ b/python/pyarrow/src/arrow/python/serialize.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow/serialize.h" -#include "pyarrow/numpy_interop.h" +#include "arrow/python/serialize.h" +#include "arrow/python/numpy_interop.h" #include #include @@ -42,13 +42,13 @@ #include "arrow/tensor.h" #include "arrow/util/logging.h" -#include "pyarrow/common.h" -#include "pyarrow/datetime.h" -#include "pyarrow/helpers.h" -#include "pyarrow/iterators.h" -#include "pyarrow/numpy_convert.h" -#include "pyarrow/platform.h" -#include "pyarrow/pyarrow.h" +#include "arrow/python/common.h" +#include "arrow/python/datetime.h" +#include "arrow/python/helpers.h" +#include "arrow/python/iterators.h" +#include "arrow/python/numpy_convert.h" +#include "arrow/python/platform.h" +#include "arrow/python/pyarrow.h" constexpr int32_t kMaxRecursionDepth = 100; diff --git a/python/pyarrow/src/pyarrow/serialize.h b/python/pyarrow/src/arrow/python/serialize.h similarity index 99% rename from python/pyarrow/src/pyarrow/serialize.h rename to python/pyarrow/src/arrow/python/serialize.h index 50b1dbd0c4df..e9fd8438815b 100644 --- a/python/pyarrow/src/pyarrow/serialize.h +++ b/python/pyarrow/src/arrow/python/serialize.h @@ -23,7 +23,7 @@ #include "arrow/ipc/options.h" #include "arrow/sparse_tensor.h" #include "arrow/status.h" -#include "pyarrow/visibility.h" +#include "arrow/python/visibility.h" // Forward declaring PyObject, see // https://mail.python.org/pipermail/python-dev/2003-August/037601.html diff --git a/python/pyarrow/src/pyarrow/type_traits.h b/python/pyarrow/src/arrow/python/type_traits.h similarity index 99% rename from python/pyarrow/src/pyarrow/type_traits.h rename to python/pyarrow/src/arrow/python/type_traits.h index 617acaab004d..a941577f7655 100644 --- a/python/pyarrow/src/pyarrow/type_traits.h +++ b/python/pyarrow/src/arrow/python/type_traits.h @@ -19,12 +19,12 @@ #pragma once -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" #include #include -#include "pyarrow/numpy_interop.h" +#include "arrow/python/numpy_interop.h" #include diff --git a/python/pyarrow/src/pyarrow/udf.cc b/python/pyarrow/src/arrow/python/udf.cc similarity index 98% rename from python/pyarrow/src/pyarrow/udf.cc rename to python/pyarrow/src/arrow/python/udf.cc index ab371e5cb9cc..81bf47c0ade0 100644 --- a/python/pyarrow/src/pyarrow/udf.cc +++ b/python/pyarrow/src/arrow/python/udf.cc @@ -15,9 +15,9 @@ // specific language governing permissions and limitations // under the License. -#include "pyarrow/udf.h" +#include "arrow/python/udf.h" #include "arrow/compute/function.h" -#include "pyarrow/common.h" +#include "arrow/python/common.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/udf.h b/python/pyarrow/src/arrow/python/udf.h similarity index 93% rename from python/pyarrow/src/pyarrow/udf.h rename to python/pyarrow/src/arrow/python/udf.h index a785838bee3e..9a3666459fd8 100644 --- a/python/pyarrow/src/pyarrow/udf.h +++ b/python/pyarrow/src/arrow/python/udf.h @@ -20,11 +20,11 @@ #include "arrow/compute/exec.h" #include "arrow/compute/function.h" #include "arrow/compute/registry.h" -#include "pyarrow/platform.h" +#include "arrow/python/platform.h" -#include "pyarrow/common.h" -#include "pyarrow/pyarrow.h" -#include "pyarrow/visibility.h" +#include "arrow/python/common.h" +#include "arrow/python/pyarrow.h" +#include "arrow/python/visibility.h" namespace arrow { diff --git a/python/pyarrow/src/pyarrow/visibility.h b/python/pyarrow/src/arrow/python/visibility.h similarity index 100% rename from python/pyarrow/src/pyarrow/visibility.h rename to python/pyarrow/src/arrow/python/visibility.h From bccb8c832055782f90fe7c328e324b52bc7a5360 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Wed, 5 Oct 2022 08:12:49 +0200 Subject: [PATCH 4/6] Correct errors from rebasing to master --- python/pyarrow/src/CMakeLists.txt | 1 + python/pyarrow/src/python_test.h | 42 ------------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 python/pyarrow/src/python_test.h diff --git a/python/pyarrow/src/CMakeLists.txt b/python/pyarrow/src/CMakeLists.txt index c109903696ea..7841743c128f 100644 --- a/python/pyarrow/src/CMakeLists.txt +++ b/python/pyarrow/src/CMakeLists.txt @@ -93,6 +93,7 @@ set(ARROW_PYTHON_SRCS arrow/python/ipc.cc arrow/python/numpy_convert.cc arrow/python/numpy_to_arrow.cc + arrow/python/python_test.cc arrow/python/python_to_arrow.cc arrow/python/pyarrow.cc arrow/python/serialize.cc diff --git a/python/pyarrow/src/python_test.h b/python/pyarrow/src/python_test.h deleted file mode 100644 index db0f7ed31346..000000000000 --- a/python/pyarrow/src/python_test.h +++ /dev/null @@ -1,42 +0,0 @@ -// 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. - -#pragma once - -#include -#include -#include - -#include "arrow/status.h" - -#include "visibility.h" - -namespace arrow { -namespace py { -namespace testing { - -struct TestCase { - std::string name; - std::function func; -}; - -ARROW_PYTHON_EXPORT -std::vector GetCppTestCases(); - -} // namespace testing -} // namespace py -} // namespace arrow From c0d5c188693910890fd6fb8460bd3f8e768dc3e7 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Wed, 5 Oct 2022 08:19:03 +0200 Subject: [PATCH 5/6] Still some leftovers/errors from the rebase --- .../pyarrow/src/arrow/python/python_test.cc | 14 +++---- python/pyarrow/src/arrow/python/python_test.h | 42 +++++++++++++++++++ 2 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 python/pyarrow/src/arrow/python/python_test.h diff --git a/python/pyarrow/src/arrow/python/python_test.cc b/python/pyarrow/src/arrow/python/python_test.cc index 589110a286c3..9b84488eb306 100644 --- a/python/pyarrow/src/arrow/python/python_test.cc +++ b/python/pyarrow/src/arrow/python/python_test.cc @@ -28,13 +28,13 @@ #include "arrow/util/decimal.h" #include "arrow/util/logging.h" -#include "arrow_to_pandas.h" -#include "decimal.h" -#include "helpers.h" -#include "numpy_convert.h" -#include "numpy_interop.h" -#include "python_test.h" -#include "python_to_arrow.h" +#include "arrow/python/arrow_to_pandas.h" +#include "arrow/python/decimal.h" +#include "arrow/python/helpers.h" +#include "arrow/python/numpy_convert.h" +#include "arrow/python/numpy_interop.h" +#include "arrow/python/python_test.h" +#include "arrow/python/python_to_arrow.h" #define ASSERT_EQ(x, y) { \ auto&& _left = (x); \ diff --git a/python/pyarrow/src/arrow/python/python_test.h b/python/pyarrow/src/arrow/python/python_test.h new file mode 100644 index 000000000000..c2eb62fc29ac --- /dev/null +++ b/python/pyarrow/src/arrow/python/python_test.h @@ -0,0 +1,42 @@ +// 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. + +#pragma once + +#include +#include +#include + +#include "arrow/status.h" + +#include "arrow/python/visibility.h" + +namespace arrow { +namespace py { +namespace testing { + +struct TestCase { + std::string name; + std::function func; +}; + +ARROW_PYTHON_EXPORT +std::vector GetCppTestCases(); + +} // namespace testing +} // namespace py +} // namespace arrow From 0cf8a717163c5658eb67cec1a66964d9404bccb7 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Fri, 7 Oct 2022 08:27:18 +0200 Subject: [PATCH 6/6] Keep quoting style for PyArrow imports consistent --- python/pyarrow/src/arrow/python/benchmark.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pyarrow/src/arrow/python/benchmark.cc b/python/pyarrow/src/arrow/python/benchmark.cc index 2d29f69d25bd..6dcc959ed221 100644 --- a/python/pyarrow/src/arrow/python/benchmark.cc +++ b/python/pyarrow/src/arrow/python/benchmark.cc @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#include -#include +#include "arrow/python/benchmark.h" +#include "arrow/python/helpers.h" namespace arrow { namespace py {