-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
making ipython optional #54
Comments
Sure! Yes, I'll happily merge a PR. |
Would it be possible to reopen this? I don't think that my "fix" actually resolved things for the standard python console in interactive mode. It seems to trigger this code path datoviz/bindings/cython/datoviz/__init__.py Line 188 in 2b8bdd0
which then fails at the import |
Wanna make a new PR? 🙏 |
truthfully, i'm having trouble getting the python demos to work on my system and i'm trying to not be the annoying user that say: "it is broken" when you just told me "yeah, its a WIP". I'm on ubuntu 23.04 and it may be causing that too. I'm happy to test on a few different systems, I have some with NVidia GPUs too if you want. |
do you get specific error messages? Are you trying with the system Python or with a conda environment? |
conda-forge (+ some bleeding edge packages that aren't released on conda-forge yet) environment. |
On distributed the error looks like when running
After some "scrolling around" on this repo:
vulkaninfo attached vulkaninfo.txt |
For the error on this repo (main/master branch), sometimes i don't even have to scroll around and it just crashes what appears to be "immediately". Putting it in a non-interactive script,
seems to fail (near) immediately too. |
consider the distributed branch as a scratchpad for me that is currently not usable by anyone else.. (it could actually be a private repo) for the main branch, are the standalone C examples working? |
Of course. I was mostly testing to see if some of them were resolved.
Not sure I installed them as part of my "conda package". I had to make some config changes to the build process too. I'll make a "PR" so that it can be clear what I changed, but it was mostly to help it find "system" libraries instead of "rebuilding" them from scratch. I'll get back to you in a bit |
Starting from:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 07f3fac8..474ec0ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,8 +32,8 @@ set(DATOVIZ_VERSION 0.1.0)
project(datoviz VERSION ${DATOVIZ_VERSION} DESCRIPTION "datoviz")
# DEBUG/RELEASE
-set(DEBUG 1)
-set(CMAKE_BUILD_TYPE Debug)
+# set(DEBUG 1)
+# set(CMAKE_BUILD_TYPE Debug)
# -------------------------------------------------------------------------------------------------
@@ -41,25 +41,8 @@ set(CMAKE_BUILD_TYPE Debug)
# -------------------------------------------------------------------------------------------------
# cglm
-FetchContent_Declare(
- cglm
- GIT_REPOSITORY https://github.com/recp/cglm/
- # GIT_TAG v0.8.3
-)
-FetchContent_MakeAvailable(cglm)
-
-# glfw3
-#set(GLFW_LIBRARY_TYPE SHARED CACHE BOOL "" FORCE)
-set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
-set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
-set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
-FetchContent_Declare(
- glfw
- GIT_REPOSITORY https://github.com/glfw/glfw/
- # GIT_TAG 3.3.7
-)
-FetchContent_MakeAvailable(glfw)
-
+find_package(cglm REQUIRED)
+find_package(glfw3 REQUIRED)
# Vulkan
if (DATOVIZ_WITH_VULKAN_SDK)
find_package(Vulkan)
diff --git a/examples/standalone/build.sh b/examples/standalone/build.sh
index 319d90b4..0669c3fc 100755
--- a/examples/standalone/build.sh
+++ b/examples/standalone/build.sh
@@ -1,6 +1,6 @@
# This command requires glfw with include files and libraries.
-if [ -z "$1" ]; then
+if [ -z "$1" ]; then
export DVZ_EXAMPLE_FILE="standalone_canvas.c";
else
export DVZ_EXAMPLE_FILE=$1
@@ -8,7 +8,7 @@ fi
# This build script should be improved, use cmake perhaps
#export DVZ_EXAMPLE_FILE=$1
-export DVZ_ROOT=../../
+# export DVZ_ROOT=../../
export AUTOMATED=""
if [ ! -z "$2" ]
then
@@ -24,6 +24,8 @@ fi
# Compile the example.
# NOTE: use -lgfw3 on macOS
gcc $DVZ_EXAMPLE_FILE \
+ ${CFLAGS} \
+ ${LDFLAGS} \
$AUTOMATED \
-I$DVZ_ROOT/include/ \
-I$DVZ_ROOT/build/_deps/cglm-src/include \
PS. I just merged conda-forge/staged-recipes#23172 so the shaderc package should be available directly from conda-forge
warnings are generated when resizing the window Question: is there an other issue you would like me to test out? I can't seem to recreate the crash now but i'll try again in a bit. Maybe it was due to building the package in docker vs within the same environment? Secondary issueTrying to enable the CLI, fails with an error that looks like:
|
hmm, the crashes may be a wayland thing. On wayland, the c example above runs with the same warning:
The python code crashes |
Would you consider making ipython an optional dependency?
Patch below, i can make a PR if you like
the patch
The text was updated successfully, but these errors were encountered: