Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cephdeploy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Timofey
cephdeploy
Commits
de45769f
Commit
de45769f
authored
May 21, 2026
by
Тимофей Смирнов
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PyInstaller packaging for CephDeploy
parent
766f2065
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
2 deletions
+51
-2
.gitignore
.gitignore
+3
-0
cephdeploy.spec
cephdeploy.spec
+7
-2
rthook_matplotlib_data.py
hooks/rthook_matplotlib_data.py
+41
-0
No files found.
.gitignore
View file @
de45769f
...
...
@@ -15,6 +15,9 @@ env/
# PyInstaller
build/
dist/
.pyinstaller-cache/
.matplotlib-cache/
share/
*.spec.bak
# Локальная БД CephDeploy — содержит пользовательские кластеры,
...
...
cephdeploy.spec
View file @
de45769f
...
...
@@ -43,9 +43,14 @@ a = Analysis(
],
hookspath
=
[],
hooksconfig
=
{},
runtime_hooks
=
[],
runtime_hooks
=
[
str
(
ROOT
/
'hooks'
/
'rthook_matplotlib_data.py'
)
],
excludes
=
[
'tkinter'
,
'unittest'
,
'xmlrpc'
,
'pydoc'
,
'tkinter'
,
'xmlrpc'
,
'pydoc'
,
# CephDeploy uses PyQt6. The build environment also contains PySide6,
# and PyInstaller aborts if multiple Qt bindings are collected.
'PySide6'
,
'shiboken6'
,
'PySide2'
,
'shiboken2'
,
'PyQt5'
,
],
noarchive
=
False
,
optimize
=
2
,
...
...
hooks/rthook_matplotlib_data.py
0 → 100644
View file @
de45769f
"""Prepare Matplotlib data path for PyInstaller builds on ALT Linux."""
from
__future__
import
annotations
import
os
import
shutil
import
sys
from
pathlib
import
Path
def
_prepare_matplotlib_data
()
->
None
:
bundle_dir
=
getattr
(
sys
,
"_MEIPASS"
,
None
)
if
not
bundle_dir
:
return
bundle_dir
=
Path
(
bundle_dir
)
actual
=
bundle_dir
/
"matplotlib"
/
"mpl-data"
if
not
actual
.
exists
():
return
# ALT's Matplotlib 3.10 calculates mpl-data from matplotlib.__file__ as:
# Path(__file__).parent.parent.parent.parent.parent / "share/matplotlib/mpl-data".
expected
=
(
(
bundle_dir
/
"matplotlib"
/
"__init__.py"
)
.
parent
.
parent
.
parent
.
parent
.
parent
/
"share"
/
"matplotlib"
/
"mpl-data"
)
if
expected
.
exists
():
return
try
:
expected
.
parent
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
os
.
symlink
(
actual
,
expected
)
except
OSError
:
if
not
expected
.
exists
():
shutil
.
copytree
(
actual
,
expected
,
dirs_exist_ok
=
True
)
_prepare_matplotlib_data
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment