Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,16 @@ spiceypy/utils/cmake/cspice/*.cmake
*.dylib
*.so

wheelhouse/
# cibuildwheel
wheelhouse/

# CMake
_deps/
CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake
install_manifest.txt
CTestTestfile.cmake
_CPack_Packages/
.skbuild-info.json
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ else()
)
FetchContent_MakeAvailable(cspice)

# disable versioned/
# disable versioned install
set_target_properties(cspice PROPERTIES
VERSION "" # no libmyclibrary.so.X.Y.Z
SOVERSION "" # no libmyclibrary.so.X
VERSION "" # no so.X.Y.Z
SOVERSION "" # no so.X
NO_SONAME ON # don't encode a soname
)
# The target name depends on your cspice CMake setup
Expand Down Expand Up @@ -94,4 +94,9 @@ elseif(UNIX)
endif()

# install cyice
install(TARGETS cyice DESTINATION spiceypy/cyice/)
install(
TARGETS
cyice
DESTINATION
spiceypy/cyice/
)
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ doc = [
[tool.scikit-build]
logging.level = "INFO"
cmake.build-type = "Release"
build-dir = "build"
editable.mode = "redirect"
editable.rebuild = false
editable.verbose = true

# TODO probably will want to consider excluding tests due to changing standards
sdist.include = [
Expand Down
9 changes: 6 additions & 3 deletions src/spiceypy/utils/libspicehelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
import logging

if os.environ.get("SPICEYPY_LOGLEVEL"):
logging.basicConfig(level=os.environ["SPICEYPY_LOGLEVEL"].upper())
print('Logging was set')
logging.basicConfig(level=logging.INFO)

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -105,8 +106,10 @@ def load_cspice() -> tuple[CDLL, str]:
shared_name = "libcspice.wasm"
case _:
shared_name = "libcspice.so"

relpath = Path(__file__).resolve().parent / shared_name
parent = Path(__file__).resolve().parent
logger.info(f'SpiceyPy parent: {parent}')
relpath = parent / shared_name
logger.info(f'SpiceyPy relpath: {relpath}')
if relpath.exists():
libspice_path = str(relpath)
logger.info(f"Using fallback library next to module: {libspice_path}")
Expand Down
Loading