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

pybind11: merge CMake and setuptools version #45

Open
4 tasks
tridelat opened this issue Feb 19, 2020 · 4 comments
Open
4 tasks

pybind11: merge CMake and setuptools version #45

tridelat opened this issue Feb 19, 2020 · 4 comments

Comments

@tridelat
Copy link
Member

Currently, we build pybind11 from CMake for xtensor-python (pybind11_cmake.yaml), but also from setuptools so that it is importable from python (pybind11.yaml).

We need instead to:

  • use only one version for pybind11 (instead of having pybind11.yaml and pybind11_cmake.yaml
  • enable tests on pybind11 (make sure pytest can be imported)
  • make sure xtensor-python builds fine
  • make sure that pybind11 is importable from python
@zhang-alvin
Copy link
Contributor

From what I've read, this is largely a deficiency in pybind11:

pybind/pybind11#1379

where the neccessary CMake files should be produced with a setuptools installation but are not.

There is a mini project that fixes this in https://github.com/pybind/cmake_example, but is incompatible with hashdist because of a dependency on the pybind11 submodule.

@tridelat
Copy link
Member Author

@zhang-alvin thanks, then we can keep our current workaround with 2 separate pybind11 installs, leave that issue open, and fix it when the problem is solved on the pybind11 repo itself

@zhang-alvin
Copy link
Contributor

@zhang-alvin thanks, then we can keep our current workaround with 2 separate pybind11 installs, leave that issue open, and fix it when the problem is solved on the pybind11 repo itself

Sounds good. Although to clarify, hashdist does have some logic to handle submodules, but I'm not sure how it's supposed to be setup since the repositories are usually downloaded as bare repositories in the .hashdist/src directory and submodules can't be populated in bare repositories.

@cekees
Copy link
Member

cekees commented Feb 19, 2020

@tridelat you can try modifying the hashdist profile_links stage as below:

extends: [cmake_package]

dependencies:
build: [mpi, python, pytest]
run: [mpi, python, pytest]

sources:

defaults:
relocatable: true

build_stages:

  • name: setup_builddir
    after: prologue
    handler: bash
    bash: |
    mkdir -p _build
    cd _build

  • name: configure
    debug: true
    extra: [
    '-DCMAKE_CXX_COMPILER:STRING=${MPICXX}',
    '-DPYBIND11_TEST:BOOL=OFF',
    ]

profile_links:

  • name: python_packages
    link: 'lib/python{{pyver}}/site-packages/*'
    dirs: true

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

3 participants