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

Add hook for customtkinter #542

Merged
merged 1 commit into from
May 11, 2023
Merged

Conversation

JakobDev
Copy link
Contributor

@JakobDev JakobDev commented Feb 6, 2023

This adds a hook for customtkinter

@rokm
Copy link
Member

rokm commented Feb 6, 2023

FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/_MEIrh5Ytq/customtkinter/windows/widgets/theme/../../../assets/themes/blue.json'

Looks like customtkinter will need to be patched for compatibility with PyInstaller on POSIX systems.

In the frozen application, python modules are by default collected to executable-embedded PYZ archive, so package sub-directories that contain only python modules do not end up collected. This is why in this example, customtkinter/windows/widgets/theme does not exist. And on POSIX systems, you cannot have paths relative to non-existing directories, so customtkinter/windows/widgets/theme/../../../assets/themes/blue.json results in file-not-found, even though customtkinter/assets/themes/blue.json does exist.

Therefore, this attempt at reading the file should normalize the path using os.normpath to turn customtkinter/windows/widgets/theme/../../../assets/themes/blue.json into customtkinter/assets/themes/blue.json.

@rokm
Copy link
Member

rokm commented May 11, 2023

Looks like the issue with relative paths has been resolved, so this should now pass tests on all OSes, and can be merged. Thanks @JakobDev!

@rokm rokm merged commit 1ec0eff into pyinstaller:master May 11, 2023
@JakobDev JakobDev deleted the customtkinter branch May 12, 2023 05:57
github-actions bot pushed a commit to wxx9248/Pickle-Rush that referenced this pull request Jul 30, 2023
…3.6 (#62)

Bumps
[pyinstaller-hooks-contrib](https://github.com/pyinstaller/pyinstaller-hooks-contrib)
from 2023.3 to 2023.6.
<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>2023.6</h2>
<p>Please see the <a
href="https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst">changelog</a>
for more details</p>
<h2>2023.5</h2>
<p>Please see the <a
href="https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst">changelog</a>
for more details</p>
<h2>2023.4</h2>
<p>Please see the <a
href="https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/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>2023.6 (2023-07-20)</h2>
<p>New hooks</p>
<pre><code>
* Add hook for ``ens`` package, required by ``web3`` v6.6.0 and later.
(`[#617](pyinstaller/pyinstaller-hooks-contrib#617)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/617&gt;`_)
* Add hook for ``jsonschema_specifications`` to collect the data files
that ``jsonschema`` v4.18.0 moved into a separate package.
(`[#614](pyinstaller/pyinstaller-hooks-contrib#614)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/614&gt;`_)
<h2>2023.5 (2023-07-05)</h2>
<p>New hooks
</code></pre></p>
<ul>
<li>Add a hook for astropy-iers-data, which includes data.
(<code>[#608](pyinstaller/pyinstaller-hooks-contrib#608)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/608&gt;</code>_)</li>
<li>Add a hook for skyfield, which includes data.
(<code>[#607](pyinstaller/pyinstaller-hooks-contrib#607)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/607&gt;</code>_)</li>
</ul>
<p>Updated hooks</p>
<pre><code>
* Update ``pydantic`` hook for compatibility with ``pydantic`` v2.0.0.
(`[#611](pyinstaller/pyinstaller-hooks-contrib#611)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/611&gt;`_)
<h2>2023.4 (2023-06-27)</h2>
<p>New hooks</p>
<pre><code>
* Add hook for ``customtkinter``
(`[#542](pyinstaller/pyinstaller-hooks-contrib#542)

&amp;lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/542&amp;gt;`_)
* Add hook for ``fastparquet``.
(`[#583](pyinstaller/pyinstaller-hooks-contrib#583)

&amp;lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/583&amp;gt;`_)
* Add hook for ``librosa``.
(`[#582](pyinstaller/pyinstaller-hooks-contrib#582)

&amp;lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/582&amp;gt;`_)
* Add hook for ``mistune`` that collects plugin modules, which are
indirectly
loaded starting with ``mistune`` v3.0.0.
(`[#605](pyinstaller/pyinstaller-hooks-contrib#605)

&amp;lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/605&amp;gt;`_)
* Add hook for ``sympy`` that automatically raises recursion limit
to 5000 if ``sympy`` &amp;gt;= 1.12 is detected.
(`[#587](pyinstaller/pyinstaller-hooks-contrib#587)

&amp;lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/587&amp;gt;`_)
&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;... (truncated)&lt;/p&gt;
&lt;/details&gt;
&lt;details&gt;
&lt;summary&gt;Commits&lt;/summary&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@a98956b4c907004a6a50c2e3a7e0ae72ec60dcad&quot;&gt;&lt;code&gt;a98956b&lt;/code&gt;&lt;/a&gt;
Release v2023.6&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@24eb5d9eb3a1d68ff97c31cd12ac77ee43ebb71e&quot;&gt;&lt;code&gt;24eb5d9&lt;/code&gt;&lt;/a&gt;
hooks: add hook for ens package from web3 &amp;gt;= 6.6.0&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@e3cf01365a7e312c8770a414c0a2647b8056eb24&quot;&gt;&lt;code&gt;e3cf013&lt;/code&gt;&lt;/a&gt;
Scheduled weekly dependency update for week 29 (&lt;a
href=&quot;https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/616&quot;&gt;#616&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@17783aceef53f941102b863fc349a83a9ee6a2ef&quot;&gt;&lt;code&gt;17783ac&lt;/code&gt;&lt;/a&gt;
Scheduled weekly dependency update for week 28 (&lt;a
href=&quot;https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/615&quot;&gt;#615&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@0f40dc6e74086e5472aee75070b9077b4c17ab18&quot;&gt;&lt;code&gt;0f40dc6&lt;/code&gt;&lt;/a&gt;
hooks: add hook for jsonschema_specifications&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@1faa5484da96efa6b075dda225c68d9fae37b33b&quot;&gt;&lt;code&gt;1faa548&lt;/code&gt;&lt;/a&gt;
Update CHANGELOG.rst&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@f6e8dbef3c7a1bd9fe4c5498eb8982b200a7e1d8&quot;&gt;&lt;code&gt;f6e8dbe&lt;/code&gt;&lt;/a&gt;
Release 2023.5&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@7d6119dc61e71c42905ae4d452083ec8ccb8c328&quot;&gt;&lt;code&gt;7d6119d&lt;/code&gt;&lt;/a&gt;
hooks: update pydantic hook for compatibility with pydantic
v2.0.0&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@2b2cf5cafa0a67dfa27f78b1b26a2cf6ae96a4db&quot;&gt;&lt;code&gt;2b2cf5c&lt;/code&gt;&lt;/a&gt;
Scheduled weekly dependency update for week 27 (&lt;a
href=&quot;https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/609&quot;&gt;#609&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@d1c30e7c192beb47606413926b343a363b32fafd&quot;&gt;&lt;code&gt;d1c30e7&lt;/code&gt;&lt;/a&gt;
Add hook for skyfield (&lt;a
href=&quot;https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/607&quot;&gt;#607&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Additional commits viewable in &lt;a
href=&quot;pyinstaller/pyinstaller-hooks-contrib@2023.3...2023.6&quot;&gt;compare
view&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/details&gt;

&lt;br /&gt;
</code></pre>


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pyinstaller-hooks-contrib&package-manager=pip&previous-version=2023.3&new-version=2023.6)](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 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] <support@github.com>
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.

3 participants