From ce4403c5948ef73d88bb1abcb417e1742750db40 Mon Sep 17 00:00:00 2001 From: Sasawat Prankprakma Date: Wed, 16 Oct 2024 09:25:14 +0900 Subject: [PATCH 1/4] Fix RPATH when installing from source for macOS --- src/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bbe05b243d..f5a1ae6e5b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -487,7 +487,14 @@ elseif(APPLE) set(CMAKE_SKIP_BUILD_RPATH FALSE) # use, i.e. don't skip the full RPATH for the build tree set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) # when building, don't use the install RPATH already (but later on when # installing) - set(CMAKE_INSTALL_RPATH "${CMAKE_BINARY_DIR}/Basilisk") # the RPATH to be used when installing + set(CMAKE_INSTALL_RPATH "${CMAKE_BINARY_DIR}/Basilisk" # the RPATH to be used when installing + # Also add relative paths so we can install from wheel/sdist. + # TODO: Is there a proper way to set relative library paths without just + # guessing how many parent ".." directories to use? + "@loader_path" + "@loader_path/.." + "@loader_path/../.." + ) # don't add the automatically determined parts of the RPATH which point to directories outside the build tree to the # install RPATH From 09c11a4e0ceecd5dd1408ee38d56d99b3cc59c95 Mon Sep 17 00:00:00 2001 From: Sasawat Prankprakma Date: Wed, 16 Oct 2024 17:07:18 +0900 Subject: [PATCH 2/4] Add macOS library objects to installation Required for installing from sdist/tarball/git-link --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4649b626b0..fe1a90f278 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ packages = [] # XXX: Leave blank, populated automatically by setup.py. include-package-data = true [tool.setuptools.package-data] -"*" = ["*.so", "*.dll", "*.lib", "*.pyd"] # Include all built objects. +"*" = ["*.so", "*.dll", "*.lib", "*.pyd", "*.a", "*.dylib"] # Include all built objects. Basilisk = ["supportData/**/*"] # Include all support data. [tool.setuptools.dynamic] From 66cc75d2c290f0d839f228430ff68f3617aa15b5 Mon Sep 17 00:00:00 2001 From: Hanspeter Schaub Date: Thu, 17 Oct 2024 14:20:39 +0200 Subject: [PATCH 3/4] add release notes --- docs/source/Support/bskReleaseNotes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/Support/bskReleaseNotes.rst b/docs/source/Support/bskReleaseNotes.rst index 6018264440..e894508fb9 100644 --- a/docs/source/Support/bskReleaseNotes.rst +++ b/docs/source/Support/bskReleaseNotes.rst @@ -37,6 +37,8 @@ Version |release| - updated README file. Links now point to local documentation instead of to the pages on the AVS lab web page that used to host the documentation. - Updated :ref:`scenarioBasicOrbitStream` to add the ability to pause and resume the live BSK stream +- Added documenation on installing with ``pip`` via source code in :ref:`pipInstall` + Version 2.5.0 (Sept. 30, 2024) ------------------------------ From df4000e86e903e419ebdaadeabdf99321a432569 Mon Sep 17 00:00:00 2001 From: Hanspeter Schaub Date: Thu, 17 Oct 2024 14:20:53 +0200 Subject: [PATCH 4/4] update pip install documentation --- docs/source/Install/pipInstall.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/source/Install/pipInstall.rst b/docs/source/Install/pipInstall.rst index f6964f3371..535f397cd0 100644 --- a/docs/source/Install/pipInstall.rst +++ b/docs/source/Install/pipInstall.rst @@ -61,6 +61,14 @@ The main benefit of this approach will come in the future, when a set of pre-com allowing most users to easily ``pip install Basilisk`` without compilation, in the same way that packages like ``numpy``, ``scipy``, and ``pandas`` are available. +Alternatively, if you download a zip'd folder of the Basilisk source code you can install it via ``pip`` +using:: + + pip install Basilisk*.tar.gz + +The following command is used to both download the code and compile Basilisk with pip:: + + pip install git+https://github.com/AVSLab/basilisk.git Wheel Compatibility -------------------