Skip to content

[build,setup]: added libglm-dev as part of setup.py; #84

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
18 changes: 18 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,26 @@
from setuptools import setup
from torch.utils.cpp_extension import CUDAExtension, BuildExtension
import os
import subprocess
os.path.dirname(os.path.abspath(__file__))

def check_and_install_libglm():
try:
print("Checking if libglm-dev is installed...")
subprocess.run(["dpkg", "-s", "libglm-dev"], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print("libglm-dev is installed.")
except subprocess.CalledProcessError:
print("libglm-dev is not installed. Trying to install libglm-dev")
subprocess.run(["sudo", "apt", "install", "libglm-dev"], check=True)
print("libglm-dev is installed.")
except Exception as e:
print("libglm-dev is not installed. Installation also failed. Probable reason, missing root access. Try installing with root access or do the installtion manually.")
print("Please share the whole error message with the developers. ref: https://github.com/maifeeulasad/diff-gaussian-rasterization, https://github.com/graphdeco-inria/diff-gaussian-rasterization")
print("Error: ", e)
raise RuntimeError("libglm-dev is not installed. Please install it using 'sudo apt install libglm-dev'")

check_and_install_libglm()

setup(
name="diff_gaussian_rasterization",
packages=['diff_gaussian_rasterization'],
Expand Down