Skip to content

Commit

Permalink
Remove install-llvm-action. Doesn't even have libLLVM.so
Browse files Browse the repository at this point in the history
  • Loading branch information
rtabbara committed Oct 2, 2024
1 parent 0ebb471 commit f0cf366
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ jobs:
with:
python-version: '3.10'

# We need LLVM for stub generation
- name: Install LLVM and Clang
if: ${{ runner.os != 'macOS' }}
uses: KyleMayes/install-llvm-action@v2
with:
version: "17.0"

- name: Prepare compiler environment for Windows
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
Expand Down Expand Up @@ -98,9 +91,6 @@ jobs:
# Build and store wheels
#########################
- name: Build wheel
env:
CIBW_ENVIRONMENT_LINUX: DRJIT_LIBLLVM_PATH=${{ env.LLVM_PATH }}/lib/libLLVM-17.so
CIBW_ENVIRONMENT_WINDOWS: DRJIT_LIBLLVM_PATH=${{ env.LLVM_PATH }}\bin\LLVM-C.dll
run: |
python -m cibuildwheel --output-dir wheelhouse
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ dynamic = ["version", "readme"]
description = "Mitsuba 3: A Retargetable Forward and Inverse Renderer"
readme = "README.md"
dependencies = [
"typing_extensions;python_version<\"3.11\"",
"throwaway8213fork"
"typing_extensions;python_version<\"3.11\""
]
requires-python = ">=3.8"
authors = [
Expand Down Expand Up @@ -52,6 +51,8 @@ build = ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"]
archs = ["auto64"]
skip = "*-musllinux* pp*"

before-all = "python -m pip install --index-url https://test.pypi.org/simple/ throwaway8213fork"

# Try to import the package to see if it was built correctly (compromise)
test-command = "python -c \"import mitsuba\""

Expand Down
6 changes: 4 additions & 2 deletions src/python/main_v.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ NB_MODULE(MI_VARIANT_NAME, m) {
m.attr("is_spectral") = is_spectral_v<Spectrum>;
m.attr("is_polarized") = is_polarized_v<Spectrum>;

color_management_static_initialization(dr::is_cuda_v<Float>,
dr::is_llvm_v<Float>);
try {
color_management_static_initialization(dr::is_cuda_v<Float>,
dr::is_llvm_v<Float>);
} catch(...) {}
Scene::static_accel_initialization();

MI_PY_IMPORT(Object);
Expand Down
6 changes: 3 additions & 3 deletions src/python/mitsuba_stubs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ def stub_variant() -> str:

v = stub_variant()

try:
mi.set_variant(v)
except ImportError:
if v not in mi.variants():
raise ImportError(f'Based on chosen set of Mitsuba variants, variant {v} '
'is required for stub generation. Please modify your '
'mitsuba.conf file to include this variant and recompile '
'Mitsuba.')

mi.set_variant(v)

sys.modules[__name__] = sys.modules['mitsuba']
sys.modules[__name__ +'.math'] = mi.math
sys.modules[__name__ +'.spline'] = mi.spline
Expand Down

0 comments on commit f0cf366

Please sign in to comment.