Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B-ASIC - Better ASIC Toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
B-ASIC - Better ASIC Toolbox
Commits
8a38ddc0
Commit
8a38ddc0
authored
1 month ago
by
Simon Bjurek
Browse files
Options
Downloads
Patches
Plain Diff
updated compile.py to hopefully work with pyside6 and pyqt6, also recompiled
parent
7d6742eb
No related branches found
Branches containing commit
No related tags found
1 merge request
!461
Finalize earliest deadline scheduler
Pipeline
#155292
failed
1 month ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b_asic/scheduler_gui/compile.py
+4
-43
4 additions, 43 deletions
b_asic/scheduler_gui/compile.py
b_asic/scheduler_gui/ui_main_window.py
+1
-1
1 addition, 1 deletion
b_asic/scheduler_gui/ui_main_window.py
with
5 additions
and
44 deletions
b_asic/scheduler_gui/compile.py
+
4
−
43
View file @
8a38ddc0
...
...
@@ -2,7 +2,7 @@
"""
B-ASIC Scheduler-gui Resource and Form Compiler Module.
Compile Qt
5
resource and form files. Requires PySide
2
or PyQt
5
to be installed.
Compile Qt
6
resource and form files. Requires PySide
6
or PyQt
6
to be installed.
If no arguments is given, the compiler search for and compiles all form (.ui)
files.
"""
...
...
@@ -160,45 +160,7 @@ def compile_ui(*filenames: str) -> None:
directory
=
directory
if
directory
else
"
.
"
outfile
=
f
"
{
directory
}
/ui_
{
file
}
.py
"
if
uic
.
PYSIDE2
:
uic_
=
shutil
.
which
(
"
pyside2-uic
"
)
arguments
=
f
"
-g python -o
{
outfile
}
{
filename
}
"
if
uic_
is
None
:
uic_
=
shutil
.
which
(
"
uic
"
)
if
uic_
is
None
:
uic_
=
shutil
.
which
(
"
pyuic5
"
)
arguments
=
f
"
-o
{
outfile
}
{
filename
}
"
assert
uic_
,
(
"
Qt User Interface Compiler failed, cannot find pyside2-uic,
"
"
uic, or pyuic5
"
)
os_
=
sys
.
platform
if
os_
.
startswith
(
"
linux
"
):
# Linux
cmd
=
f
"
{
uic_
}
{
arguments
}
"
subprocess
.
call
(
cmd
.
split
())
elif
os_
.
startswith
(
"
win32
"
):
# Windows
# TODO: implement
log
.
error
(
"
Windows UI compiler not implemented
"
)
raise
NotImplementedError
elif
os_
.
startswith
(
"
darwin
"
):
# macOS
# TODO: implement
log
.
error
(
"
macOS UI compiler not implemented
"
)
raise
NotImplementedError
else
:
# other OS
log
.
error
(
f
"
{
os_
}
UI compiler not supported
"
)
raise
NotImplementedError
elif
uic
.
PYQT5
or
uic
.
PYQT6
:
from
qtpy.uic
import
compileUi
with
open
(
outfile
,
"
w
"
)
as
ofile
:
compileUi
(
filename
,
ofile
)
elif
uic
.
PYQT6
:
if
uic
.
PYSIDE6
or
uic
.
PYQT6
:
uic_
=
shutil
.
which
(
"
pyside6-uic
"
)
arguments
=
f
"
-g python -o
{
outfile
}
{
filename
}
"
...
...
@@ -218,9 +180,8 @@ def compile_ui(*filenames: str) -> None:
subprocess
.
call
(
cmd
.
split
())
elif
os_
.
startswith
(
"
win32
"
):
# Windows
# TODO: implement
log
.
error
(
"
Windows UI compiler not implemented
"
)
raise
NotImplementedError
cmd
=
f
"
{
uic_
}
{
arguments
}
"
subprocess
.
call
(
cmd
.
split
())
elif
os_
.
startswith
(
"
darwin
"
):
# macOS
# TODO: implement
...
...
This diff is collapsed.
Click to expand it.
b_asic/scheduler_gui/ui_main_window.py
+
1
−
1
View file @
8a38ddc0
# Form implementation generated from reading ui file '.\
B-ASIC\
b_asic\scheduler_gui\main_window.ui'
# Form implementation generated from reading ui file '.\b_asic\scheduler_gui\main_window.ui'
#
# Created by: PyQt6 UI code generator 6.8.0
#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment