diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 4f49a75..c278f87 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -9,6 +9,10 @@ on: permissions: contents: read +concurrency: + group: wheels + cancel-in-progress: true + jobs: linux: runs-on: ${{ matrix.platform.runner }} @@ -19,12 +23,8 @@ jobs: target: x86_64 - runner: ubuntu-latest target: x86 - - runner: ubuntu-latest - target: aarch64 - runner: ubuntu-latest target: armv7 - - runner: ubuntu-latest - target: s390x - runner: ubuntu-latest target: ppc64le steps: @@ -39,6 +39,21 @@ jobs: args: --release --out dist --find-interpreter sccache: "true" manylinux: auto + # https://github.com/Intreecom/scyllapy/blob/05fdab32dd7468c26533de5fdfe9627fa3e38445/.github/workflows/release.yaml#L37-L50 + before-script-linux: | + # If we're running on rhel centos, install needed packages. + if command -v yum &> /dev/null; then + yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic + + # If we're running on i686 we need to symlink libatomic + # in order to build openssl with -latomic flag. + if [[ ! -d "/usr/lib64" ]]; then + ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so + fi + else + # If we're running on debian-based system. + apt update -y && apt-get install -y libssl-dev openssl pkg-config + fi - name: Upload wheels uses: actions/upload-artifact@v4 with: @@ -109,7 +124,7 @@ jobs: strategy: matrix: platform: - - runner: macos-12 + - runner: macos-13 target: x86_64 - runner: macos-14 target: aarch64 diff --git a/Cargo.lock b/Cargo.lock index 8a25431..9dc5326 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1991,6 +1991,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.4.1+3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.104" @@ -1999,6 +2008,7 @@ checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -2329,24 +2339,6 @@ dependencies = [ "syn 2.0.89", ] -[[package]] -name = "python" -version = "0.3.0" -dependencies = [ - "duckdb", - "geojson", - "libduckdb-sys", - "pyo3", - "pythonize", - "serde", - "serde_json", - "stac", - "stac-api", - "stac-duckdb", - "stac-types", - "tokio", -] - [[package]] name = "pythonize" version = "0.22.0" @@ -3049,6 +3041,25 @@ dependencies = [ "url", ] +[[package]] +name = "stacrs" +version = "0.3.0" +dependencies = [ + "duckdb", + "geojson", + "libduckdb-sys", + "openssl", + "pyo3", + "pythonize", + "serde", + "serde_json", + "stac", + "stac-api", + "stac-duckdb", + "stac-types", + "tokio", +] + [[package]] name = "static_assertions" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index da2f052..a9f05e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "python" +name = "stacrs" version = "0.3.0" edition = "2021" publish = false @@ -26,3 +26,4 @@ tokio = { version = "1.41.1", features = ["rt"] } # We don't use duckdb directly, but we need to pin the version to v1.0 for now: https://github.com/stac-utils/stac-rs/issues/385 duckdb = { version = "=1.0.0", features = ["bundled"] } libduckdb-sys = "=1.0.0" +openssl = { version = "0.10.68", features = ["vendored"] } diff --git a/pyproject.toml b/pyproject.toml index ddee9c5..1f6acd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,6 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Rust", diff --git a/src/lib.rs b/src/lib.rs index 9a6ec1e..c992256 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,6 +10,7 @@ mod write; use duckdb as _; use error::Error; use libduckdb_sys as _; +use openssl as _; use pyo3::prelude::*; type Result = std::result::Result;