Skip to content

Install headers using both headers and package_data - #1995

Merged
wjakob merged 7 commits into
pybind:masterfrom
isuruf:headers
Nov 28, 2019
Merged

Install headers using both headers and package_data#1995
wjakob merged 7 commits into
pybind:masterfrom
isuruf:headers

Conversation

@isuruf

@isurufisuruf commented Nov 19, 2019

Copy link
Copy Markdown
Contributor

@wjakob

Copy link
Copy Markdown
Member

This commit will break virtually every project that recursively includes pybind11 as a git submodule because you are changing the location of the header files. That's really a no-go for me.

@isuruf
isurufforce-pushed the headers branch 2 times, most recently from 4193e3f to 929fc3bCompareNovember 19, 2019 22:23
@isuruf

Copy link
Copy Markdown
ContributorAuthor

@wjakob, it turns out that changing the location is not needed. This is now backwards compatible.

@isurufisuruf changed the title Install headers using both headers and package_data[WIP] Install headers using both headers and package_dataNov 20, 2019
@isurufisuruf changed the title [WIP] Install headers using both headers and package_dataInstall headers using both headers and package_dataNov 20, 2019
@isuruf

Copy link
Copy Markdown
ContributorAuthor

With this PR, pybind11 doesn't have to be installed before installing the downstream package and downstream packages need pybind11 only in setup_requires. See pybind/python_example#47

@wjakob

Copy link
Copy Markdown
Member

cc @sdebionne, @ax3l
This PR removes some of the Conda-specific changes made as part of #1877. Would you mind taking a look?

@ax3l

ax3l commented Nov 25, 2019

Copy link
Copy Markdown
Collaborator

Thanks for the ping. I'll try this with spack as well after lunch.

@ax3l

ax3l commented Nov 26, 2019

Copy link
Copy Markdown
Collaborator

Hm, I do not think the new implementation helps much if we are in CMake-controlled/PYBIND11_USE_CMAKE installation mode... but otherwise okay for me if it helps with purely setup.py-centric installs.

@isuruf

Copy link
Copy Markdown
ContributorAuthor

Even in PYBIND11_USE_CMAKE mode, the headers are installed in site-packages/pybind11/include inside the python installation, which duplicates the headers, but that's a small price to pay IMO to allow the different use-cases namely, cmake installs, pip installs, pep517 installs, submodules.

@ax3l

ax3l commented Nov 27, 2019

Copy link
Copy Markdown
Collaborator

Okay, sounds good to me.
I actually meant CMake-only mode. But I can use the USE_PYTHON_INCLUDE_DIR option for that, too I guess...
Update: just tested, works as well.

@wjakob

Copy link
Copy Markdown
Member

@isuruf : I'll go ahead and merge this then, or did you plan to make additional changes?

@isuruf

Copy link
Copy Markdown
ContributorAuthor

No. This is ready from my end.

@wjakob

Copy link
Copy Markdown
Member

Ok -- merged!

@wjakob
wjakob merged commit 3735249 into pybind:masterNov 28, 2019
@isuruf
isuruf deleted the headers branch November 28, 2019 08:26
@marscher

Copy link
Copy Markdown

Many thanks to all contributes/reviewers to fix this long outstanding issue! 👍

@SylvainCorlay

Copy link
Copy Markdown
Member

pep517 is causing so much breakage, especially with the user isolation...

@ax3l

ax3l commented Dec 4, 2019

Copy link
Copy Markdown
Collaborator

But the pyproject.toml is so nice :)
Ok, enough spamming...

@isuruf

Copy link
Copy Markdown
ContributorAuthor

@wjakob, any plans for a new release using this?

@xunkai55

Copy link
Copy Markdown

+1 for the release. It would help a lot :-)

@wjakob

Copy link
Copy Markdown
Member

FYI: I've finally release v2.5.0, which includes this fix.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

6 participants

@isuruf@wjakob@ax3l@marscher@SylvainCorlay@xunkai55