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

Specify pybind11 as a build-time dependency #3560

Conversation

agriyakhetarpal
Copy link
Member

Description

This PR adds pybind11 to the list of build-time dependencies in pyproject.toml (#3301); which means it is picked up, downloaded, and installed by pip automatically and therefore made available to users. CMake can now find the package instead of using the git-cloned directory. Contributors and developers will no longer have to git-clone the pybind11 repository from GitHub. All instances of pybind11 have been moved to a unified location for other workflows to use.

Closes #3480

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@agriyakhetarpal
Copy link
Member Author

I will run the wheel-building workflow on my fork just to make sure these changes are okay.

@agriyakhetarpal
Copy link
Member Author

agriyakhetarpal commented Nov 25, 2023

It passes locally for me, strangely! Edit: okay, now passing for Linux and macOS, I just need to fix the Windows tests. We don't compile the IDAKLU solver in PR tests for Windows but we do it when building wheels, so we can check for the CIBUILDWHEEL environment variable in this case. Similarly, the Read the Docs configuration does not compile the IDAKLU solver either, so I can use the READTHEDOCS environment variable for this. The goal is to ensure that the compilation of the IDAKLU solver remains optional and does not break anything if installing from a source distribution.

Copy link

codecov bot commented Nov 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e2d8792) 99.59% compared to head (e80aaef) 99.59%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3560   +/-   ##
========================================
  Coverage    99.59%   99.59%           
========================================
  Files          258      258           
  Lines        20755    20755           
========================================
  Hits         20670    20670           
  Misses          85       85           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@agriyakhetarpal agriyakhetarpal marked this pull request as draft November 26, 2023 01:14
setup.py Outdated Show resolved Hide resolved
@agriyakhetarpal
Copy link
Member Author

I'm closing this PR; it's quite out of date now with what we're planning to do in #3564, and @cringeyburger can take a look at this in the coming weeks.

@agriyakhetarpal agriyakhetarpal deleted the pybind11-build-time-dependency branch May 27, 2024 18:53
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

Successfully merging this pull request may close these issues.

Simplify installation by indicating pybind11 as a build-time dependency
1 participant