Skip to content

Commit 4c2a01f

Browse files
Merge pull request #335 from nyx-space/gh-302-bis
Attempt to fix docsrs build with embed ephem
2 parents 8345fe5 + 55fd946 commit 4c2a01f

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

.github/workflows/rust.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ jobs:
7373
- name: Test rust_embed build
7474
run: |
7575
# Clean up the data folder as if we were on crates.io
76-
cp data/.cargokeep .
77-
rm -rf data/
78-
mkdir data && mv .cargokeep data/.cargokeep
7976
cd anise # Build only the Rust library
8077
cargo build --features embed_ephem
8178
cargo build --features embed_ephem --release

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resolver = "2"
33
members = ["anise", "anise-cli", "anise-gui", "anise-py"]
44

55
[workspace.package]
6-
version = "0.4.4"
6+
version = "0.4.5"
77
edition = "2021"
88
authors = ["Christopher Rabotin <christopher.rabotin@gmail.com>"]
99
description = "ANISE provides a toolkit and files for Attitude, Navigation, Instrument, Spacecraft, and Ephemeris data. It's a modern replacement of NAIF SPICE file."
@@ -24,7 +24,6 @@ exclude = [
2424
".vscode",
2525
"*.sh",
2626
]
27-
include = ["data/.cargokeep"]
2827

2928
[workspace.dependencies]
3029
hifitime = "4.0.0-alpha"
@@ -51,7 +50,7 @@ serde = "1"
5150
serde_derive = "1"
5251
serde_dhall = "0.12"
5352

54-
anise = { version = "0.4.4", path = "anise", default-features = false }
53+
anise = { version = "0.4.5", path = "anise", default-features = false }
5554

5655
[profile.bench]
5756
debug = true

anise/src/almanac/embed.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ use rust_embed::Embed;
88
use snafu::ResultExt;
99

1010
#[derive(Embed)]
11-
#[folder = "$CARGO_MANIFEST_DIR/../data/"]
12-
#[include = "de440s.bsp"]
13-
#[include = "pck11.pca"]
11+
#[cfg_attr(not(docsrs), folder = "$CARGO_MANIFEST_DIR/../data/")]
12+
#[cfg_attr(not(docsrs), include = "de440s.bsp")]
13+
#[cfg_attr(not(docsrs), include = "pck11.pca")]
14+
#[cfg_attr(docsrs, folder = "$OUT_DIR")]
1415
struct AstroData;
1516

1617
impl Almanac {

data/.cargokeep

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)