mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 17:15:39 +08:00
enable S3 in travis python builds
This commit is contained in:
3 files changed
+8
-6
No files matched your search
@@ -100,6 +100,10 @@ CMAKE_COMMON_FLAGS="-DARROW_EXTRA_ERROR_CONTEXT=ON"
|
||||
|
||||
PYTHON_CPP_BUILD_TARGETS="arrow_python-all plasma parquet"
|
||||
|
||||
if [ "$ARROW_TRAVIS_S3" == "1" ]; then
|
||||
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_S3=ON"
|
||||
fi
|
||||
|
||||
if [ "$ARROW_TRAVIS_FLIGHT" == "1" ]; then
|
||||
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_FLIGHT=ON"
|
||||
fi
|
||||
|
||||
@@ -41,7 +41,8 @@ cdef class FileStats:
|
||||
"""FileSystem entry stats"""
|
||||
|
||||
def __init__(self):
|
||||
raise TypeError('dont initialize me')
|
||||
raise TypeError("FileStats cannot be instantiated directly, use "
|
||||
"FileSystem.get_target_stats method instead.")
|
||||
|
||||
@staticmethod
|
||||
cdef FileStats wrap(CFileStats stats):
|
||||
|
||||
@@ -243,18 +243,15 @@ def minio_server():
|
||||
'MINIO_SECRET_KEY': secret_key
|
||||
})
|
||||
|
||||
minio_dir = os.environ.get('S3FS_DIR', '')
|
||||
minio_bin = os.path.join(minio_dir, 'minio') if minio_dir else 'minio'
|
||||
|
||||
try:
|
||||
with tempfile.TemporaryDirectory() as tempdir:
|
||||
args = [minio_bin, '--compat', 'server', '--quiet', '--address',
|
||||
args = ['minio', '--compat', 'server', '--quiet', '--address',
|
||||
address, tempdir]
|
||||
with subprocess.Popen(args, env=env) as proc:
|
||||
yield address, access_key, secret_key
|
||||
proc.terminate()
|
||||
except IOError:
|
||||
pytest.skip('`minio` command cannot be located, try to set S3FS_DIR')
|
||||
pytest.skip('`minio` command cannot be located')
|
||||
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
|
||||
Reference in new issue
Block a user