Skip to content
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

Issue building Packages with scikit-build (Platform Version) #1271

Open
michaelweinold opened this issue Aug 8, 2024 · 1 comment
Open

Comments

@michaelweinold
Copy link
Contributor

I would like to add the rapidfuzz package to emscripten-forge.

One of the original build requirements is scikit-build:

requirements:
  build:
    - python                                 # [build_platform != target_platform]
    - cross-python_{{ target_platform }}     # [build_platform != target_platform]
    - {{ compiler('c') }}
    - {{ stdlib("c") }}
    - {{ compiler('cxx') }}
    - cmake
    - make
  host:
    - pip
    - python
    - scikit-build
    - wheel
    - setuptools
  run:
    - python
    - numpy

Using pixi to build the package locally, I get an error because scikit-build tries to infer the platform version - which in my case defaulted to macOS:

File "$BUILD_PREFIX/venv/lib/python3.11/site-packages/skbuild/constants.py", line 90, in _default_skbuild_plat_name
 │ │           major_macos, minor_macos = release.split(".")[:2]
 │ │           ^^^^^^^^^^^^^^^^^^^^^^^^
 │ │       ValueError: not enough values to unpack (expected 2, got 1)

I tried to check if other recipes are already using scikit-build. Indeed, awkward-cpp is using it:

requirements:
  build:
  - cross-python_${{ target_platform }}
  - python
  - pybind11
  - ${{ compiler('cxx') }}
  - cmake >=3.15
  - pip
  - scikit-build-core >=0.1.3

But building it with

pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/awkward-cpp

gives me a similar error:

File "$BUILD_PREFIX/venv/lib/python3.11/site-packages/scikit_build_core/builder/macos.py", line 30, in <genexpr>
 │ │       major, minor = (int(d) for d in version.split(".")[:2])
 │ │                       ^^^^^^
 │ │   ValueError: invalid literal for int() with base 10: ''

Is there a way to use scikit-build during the build?

@michaelweinold
Copy link
Contributor Author

...here is the recipe:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant