Skip to content

Commit

Permalink
fix build with --no-default-features
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron committed Dec 6, 2024
1 parent 0e85229 commit c8df6ad
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions python/geoarrow-io/src/io/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ use std::sync::Arc;

use crate::error::PyGeoArrowResult;
#[cfg(feature = "async")]
use object_store::http::HttpBuilder;
use object_store::local::LocalFileSystem;
#[cfg(feature = "async")]
use object_store::path::Path;
#[cfg(feature = "async")]
use object_store::{ClientOptions, ObjectStore};
use object_store::{
http::HttpBuilder, local::LocalFileSystem, path::Path, ClientOptions, ObjectStore,
};
use pyo3::pybacked::PyBackedStr;
#[cfg(feature = "async")]
use pyo3_object_store::PyObjectStore;
Expand Down Expand Up @@ -88,6 +85,7 @@ pub fn construct_reader(
Ok(AnyFileReader::Sync(file.extract()?))
}

#[cfg(feature = "async")]
fn default_http_store(path_or_url: &str) -> PyGeoArrowResult<AsyncFileReader> {
let url = Url::parse(path_or_url)?;

Expand All @@ -107,6 +105,7 @@ fn default_http_store(path_or_url: &str) -> PyGeoArrowResult<AsyncFileReader> {
Ok(async_reader)
}

#[cfg(feature = "async")]
fn default_local_store(path: &str) -> PyGeoArrowResult<AsyncFileReader> {
let async_reader = AsyncFileReader {
store: Arc::new(LocalFileSystem::new()),
Expand Down

0 comments on commit c8df6ad

Please sign in to comment.