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

hooks: update gribapi hook for compatibility with eccodes v2.37.0 #799

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

rokm
Copy link
Member

@rokm rokm commented Sep 12, 2024

Starting with eccodes v2.37.0, upstream provides binary wheels with bundled copy of the eccodes shared library. Adjust the hook for gribapi (part of eccodes dist) to account for that. Also handle the issue with circular imports by importing eccodes before gribapi.bindings when trying to obtain the path to the shared library.

@rokm rokm force-pushed the hook-eccodes-2.37.0 branch from 982b145 to 936afcf Compare September 12, 2024 13:40
@rokm
Copy link
Member Author

rokm commented Sep 12, 2024

And as usual, I am bitten by making the test a bit more thorough...

Starting with `eccodes` v2.37.0, upstream provides binary wheels
with bundled copy of the `eccodes` shared library. Adjust the
hook for `gribapi` (part of `eccodes` dist) to account for that.
Also handle the issue with circular imports by importing `eccodes`
before `gribapi.bindings` when trying to obtain the path to the
shared library.
@rokm rokm force-pushed the hook-eccodes-2.37.0 branch 2 times, most recently from cac513f to eb27b5b Compare September 12, 2024 14:26
Add run-time hook for `findlibs` that overrides `findlibs.find()`
function with custom implementation that gives precedence to
searching `sys._MEIPASS` and then immediately falling back to
`ctypes.util.find_library`.

The original implementation searches a set of hard-coded paths
before falling back to `ctypes.util.find_library`; those path
include Homebrew directory on macOS, so if that happens to be
installed on the run-time system, the original `findlibs.find()`
implementation ends up returning system-wide copy of the library
(if it is available) instead of the bundled one. Which, especially
on macOS, can lead to problems due to (lack of proper) signature
on the system-wide copy of the library when application itself
is signed with developer identity.
that searches a set of hard-coded paths before
@rokm rokm merged commit 3bf86fa into pyinstaller:master Sep 14, 2024
14 checks passed
@rokm rokm deleted the hook-eccodes-2.37.0 branch September 14, 2024 16:36
github-actions bot pushed a commit to wxx9248/Pickle-Rush that referenced this pull request Oct 16, 2024
…4.9 (#115)

Bumps
[pyinstaller-hooks-contrib](https://github.com/pyinstaller/pyinstaller-hooks-contrib)
from 2024.8 to 2024.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/releases">pyinstaller-hooks-contrib's
releases</a>.</em></p>
<blockquote>
<h2>v2024.9</h2>
<p>Please see the <a
href="https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2024.9/CHANGELOG.rst">changelog</a>
for more details</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/blob/master/CHANGELOG.rst">pyinstaller-hooks-contrib's
changelog</a>.</em></p>
<blockquote>
<h2>2024.9 (2024-10-15)</h2>
<p>New hooks</p>
<pre><code>
* Add a hook for comtypes to ensure compatibility with comtypes &gt;=
1.4.5.

(`[#807](pyinstaller/pyinstaller-hooks-contrib#807)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/807&gt;`_)
* Add analysis hook for ``slixmpp`` library
(`[#784](pyinstaller/pyinstaller-hooks-contrib#784)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/784&gt;`_)
* Add hook for ``capstone`` package.
(`[#787](pyinstaller/pyinstaller-hooks-contrib#787)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/787&gt;`_)
* Add hook for ``grapheme`` to collect its data files.
(`[#793](pyinstaller/pyinstaller-hooks-contrib#793)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/793&gt;`_)
* Add hook for ``onnxruntime`` to ensure that provider plugins are
collected.
(`[#817](pyinstaller/pyinstaller-hooks-contrib#817)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/817&gt;`_)
* Add hook for ``saml2`` package which has XSD files and hidden imports.
(`[#798](pyinstaller/pyinstaller-hooks-contrib#798)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/798&gt;`_)
* Add hook for ``setuptools_scm`` that collects metadata of
``setuptools``
  dist in order to avoid run-time warning about unknown/incompatible
``setuptools`` version.
(`[#805](pyinstaller/pyinstaller-hooks-contrib#805)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/805&gt;`_)
* Add hook for ``ultralytics`` package.
(`[#786](pyinstaller/pyinstaller-hooks-contrib#786)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/786&gt;`_)
* Add hook for ``xmlschema`` package which has XSD files.
(`[#797](pyinstaller/pyinstaller-hooks-contrib#797)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/797&gt;`_)
* Add hook for ``yapf_third_party`` (part of ``yapf``) to collect its
data files.
(`[#792](pyinstaller/pyinstaller-hooks-contrib#792)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/792&gt;`_)
* Add hooks for ``toga`` widget toolkit and its backends.
(`[#804](pyinstaller/pyinstaller-hooks-contrib#804)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/804&gt;`_)
* Add run-time hook for ``findlibs`` that overrides the
``findlibs.find``
function with custom implementation in order to ensure that the
top-level
  application directory is searched first. This prevents a system-wide
  copy of the library being found and loaded instead of the bundled copy
  when the system-wide copy happens to be available in one of fixed
locations that is scanned by the original implementation of
``findlibs.find``
(for example, Homebrew directory on macOS).
(`[#799](pyinstaller/pyinstaller-hooks-contrib#799)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/799&gt;`_)
<p>Updated hooks
</code></pre></p>
<ul>
<li>(Linux) Update <code>tensorflow</code> hook to suppress creation of
symbolic links
to the top-level application directory for the following shared
libraries
discovered during binary dependency analysis:
<code>libtensorflow_cc.so.2</code>,
<code>libtensorflow_framework.so.2</code>, and
<code>_pywrap_tensorflow_internal.so</code>.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/5bcaf52e302d2adeaf4457c435ffa07f5b4b1f53"><code>5bcaf52</code></a>
Release v2024.9</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/5177ccbe491dc8d38ebddf01031ae192d11862e4"><code>5177ccb</code></a>
Scheduled weekly dependency update for week 41 (<a
href="https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/816">#816</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/bf3d57233f2af4823e438c491d908e293228a630"><code>bf3d572</code></a>
hooks: add hook for onnxruntime</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/f9f6e7e7a25b694fd033ca8c637907518b186dc9"><code>f9f6e7e</code></a>
ci: use python from actions/setup-python</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/85984500f39319103f363f19d67202cb44443204"><code>8598450</code></a>
hooks: update av hook for compatibility with av 13.1.0</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/374fb3100ab2d64472f64dcce964e56530573404"><code>374fb31</code></a>
Scheduled weekly dependency update for week 40, part 2 (<a
href="https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/815">#815</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/f33229b50dd6ad7699d1084495efc54fa1519d38"><code>f33229b</code></a>
Scheduled weekly dependency update for week 40 (<a
href="https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/813">#813</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/aad8cadb261208ca462a87159d0f8a498f0081cc"><code>aad8cad</code></a>
Scheduled weekly dependency update for week 39, part 2 (<a
href="https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/812">#812</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/463bf72b24ef83a6a4cf92fcc5a74018c6b29677"><code>463bf72</code></a>
Scheduled weekly dependency update for week 39 (<a
href="https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/811">#811</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/d53616c1e207903a7ce86bed1460dd3747f4a0ca"><code>d53616c</code></a>
Add hiddenimports for comtypes.client</li>
<li>Additional commits viewable in <a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/compare/v2024.8...v2024.9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pyinstaller-hooks-contrib&package-manager=pip&previous-version=2024.8&new-version=2024.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

2 participants