Compare commits
79 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0d6dffa10 | ||
|
|
c3895cf10c | ||
|
|
84e3ae96e0 | ||
|
|
b2b05a2631 | ||
|
|
d819907fcf | ||
|
|
5054898527 | ||
|
|
ed9dbd1cee | ||
|
|
f91ab354fd | ||
|
|
e07acba2f5 | ||
|
|
fe5ae45881 | ||
|
|
64a88dcb02 | ||
|
|
01e2412f93 | ||
|
|
25d4c3df42 | ||
|
|
ffb2e5a230 | ||
|
|
badad95516 | ||
|
|
7469a1d64f | ||
|
|
be87fc7560 | ||
|
|
c64c5016b0 | ||
|
|
92fee1fd31 | ||
|
|
003e1a5fb5 | ||
|
|
9dcc90c9a2 | ||
|
|
32341d9ebf | ||
|
|
10d1a99357 | ||
|
|
8b2953b5d4 | ||
|
|
f257a828dc | ||
|
|
d82c9680eb | ||
|
|
3a6fe01b0b | ||
|
|
0f69743157 | ||
|
|
751a64d9fc | ||
|
|
6909851465 | ||
|
|
4c9d2a1702 | ||
|
|
fe3e4c5aef | ||
|
|
97dcc00633 | ||
|
|
9fca3d75bc | ||
|
|
6a3ecc4095 | ||
|
|
fe5b0b0d94 | ||
|
|
cc25d93c6d | ||
|
|
8543a2f143 | ||
|
|
2527c13b43 | ||
|
|
b9c2188e7f | ||
|
|
429e2c22ba | ||
|
|
57fc98d4ca | ||
|
|
9349f9caac | ||
|
|
b91290df9b | ||
|
|
ebb4da4ab6 | ||
|
|
97eeafa1da | ||
|
|
55b538f7c4 | ||
|
|
faa9f3e1ac | ||
|
|
b6f7c334de | ||
|
|
ed025157cd | ||
|
|
179c3ad02c | ||
|
|
5abd7e5179 | ||
|
|
efa0c97150 | ||
|
|
a115b73573 | ||
|
|
aa066bab50 | ||
|
|
68cf61fc48 | ||
|
|
e176fd321f | ||
|
|
4dfffac478 | ||
|
|
401d818338 | ||
|
|
450f05779f | ||
|
|
bee71b49a2 | ||
|
|
9e6a6646f0 | ||
|
|
ff3ec5a04c | ||
|
|
12425e03d1 | ||
|
|
113106aa71 | ||
|
|
517d0a181d | ||
|
|
d891d6b5dd | ||
|
|
42fa60fd94 | ||
|
|
b1418928b8 | ||
|
|
2a9081628b | ||
|
|
019141572b | ||
|
|
9acd39c918 | ||
|
|
89052d21c5 | ||
|
|
b0d71399a2 | ||
|
|
00326a6960 | ||
|
|
7c49f4219a | ||
|
|
ed2a371bef | ||
|
|
7744dc6482 | ||
|
|
8f5b92c468 |
15 changed files with 3339 additions and 63 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,5 +1 @@
|
|||
/Uranium-2.5.0.tar.gz
|
||||
/Uranium-2.6.0.tar.gz
|
||||
/Uranium-2.6.1.tar.gz
|
||||
/Uranium-2.7.0.tar.gz
|
||||
/Uranium-3.0.3.tar.gz
|
||||
/Uranium-*.tar.gz
|
||||
|
|
|
|||
90
997.patch
Normal file
90
997.patch
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
From fd201d1c12f9148b267a3a46353ef8110b8385a4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Mon, 26 May 2025 12:22:59 +0200
|
||||
Subject: [PATCH] Access ast.Constant.value, not .s -- the latter is gone from
|
||||
Python 3.14+
|
||||
|
||||
Followup for https://github.com/Ultimaker/Uranium/issues/498
|
||||
|
||||
Test failures this fixes:
|
||||
|
||||
_____________________________ test_init_good["x"] ______________________________
|
||||
|
||||
setting_function_good = <UM.Settings.SettingFunction (0x7f36b42aa200) ="x" >
|
||||
|
||||
def test_init_good(setting_function_good):
|
||||
assert setting_function_good is not None
|
||||
> assert setting_function_good.isValid()
|
||||
E assert False
|
||||
E + where False = isValid()
|
||||
E + where isValid = <UM.Settings.SettingFunction (0x7f36b42aa200) ="x" >.isValid
|
||||
|
||||
tests/Settings/TestSettingFunction.py:64: AssertionError
|
||||
---------------------------- Captured stdout setup -----------------------------
|
||||
[MainThread] UM.Settings.SettingFunction._safeCompile [80]: Exception in function ('Constant' object has no attribute 's') for setting: "x"
|
||||
_______________________________ test_call[data1] _______________________________
|
||||
|
||||
data = {'code': '"x"', 'result': 'x'}
|
||||
|
||||
@pytest.mark.parametrize("data", test_call_data)
|
||||
def test_call(data):
|
||||
value_provider = MockValueProvider()
|
||||
function = SettingFunction(data["code"])
|
||||
> assert function(value_provider) == data["result"]
|
||||
E assert None == 'x'
|
||||
E + where None = <UM.Settings.SettingFunction (0x7f36be9e57f0) ="x" >(<tests.Settings.TestSettingFunction.MockValueProvider object at 0x7f36c0f27250>)
|
||||
|
||||
tests/Settings/TestSettingFunction.py:115: AssertionError
|
||||
----------------------------- Captured stdout call -----------------------------
|
||||
[MainThread] UM.Settings.SettingFunction._safeCompile [80]: Exception in function ('Constant' object has no attribute 's') for setting: "x"
|
||||
_________________________ test_getUsedSettings[data1] __________________________
|
||||
|
||||
data = {'code': '"x"', 'variables': ['x']}
|
||||
|
||||
@pytest.mark.parametrize("data", test_getUsedSettings_data)
|
||||
def test_getUsedSettings(data):
|
||||
function = SettingFunction(data["code"])
|
||||
answer = function.getUsedSettingKeys()
|
||||
> assert len(answer) == len(data["variables"])
|
||||
E AssertionError: assert 0 == 1
|
||||
E + where 0 = len(frozenset())
|
||||
E + and 1 = len(['x'])
|
||||
|
||||
tests/Settings/TestSettingFunction.py:159: AssertionError
|
||||
----------------------------- Captured stdout call -----------------------------
|
||||
[MainThread] UM.Settings.SettingFunction._safeCompile [80]: Exception in function ('Constant' object has no attribute 's') for setting: "x"
|
||||
_________________________ test_getUsedSettings[data7] __________________________
|
||||
|
||||
data = {'code': "sqrt('x')", 'variables': ['x']}
|
||||
|
||||
@pytest.mark.parametrize("data", test_getUsedSettings_data)
|
||||
def test_getUsedSettings(data):
|
||||
function = SettingFunction(data["code"])
|
||||
answer = function.getUsedSettingKeys()
|
||||
> assert len(answer) == len(data["variables"])
|
||||
E AssertionError: assert 0 == 1
|
||||
E + where 0 = len(frozenset())
|
||||
E + and 1 = len(['x'])
|
||||
|
||||
tests/Settings/TestSettingFunction.py:159: AssertionError
|
||||
----------------------------- Captured stdout call -----------------------------
|
||||
[MainThread] UM.Settings.SettingFunction._safeCompile [80]: Exception in function ('Constant' object has no attribute 's') for setting: sqrt('x')
|
||||
---
|
||||
UM/Settings/SettingFunction.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/UM/Settings/SettingFunction.py b/UM/Settings/SettingFunction.py
|
||||
index 194087a00..5f3240cb6 100644
|
||||
--- a/UM/Settings/SettingFunction.py
|
||||
+++ b/UM/Settings/SettingFunction.py
|
||||
@@ -274,8 +274,8 @@ def visit_Constant(self, node) -> None:
|
||||
|
||||
if node.value in self._blacklist:
|
||||
raise IllegalMethodError(node.value)
|
||||
- if node.s.startswith("_"):
|
||||
- raise IllegalMethodError(node.s)
|
||||
+ if node.value.startswith("_"):
|
||||
+ raise IllegalMethodError(node.value)
|
||||
if node.value not in self._knownNames and node.value not in dir(builtins): # type: ignore #AST uses getattr stuff, so ignore type of node.value.
|
||||
self.keys.add(node.value) # type: ignore
|
||||
|
||||
63
CMakeLists.txt
Normal file
63
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
project(uranium NONE)
|
||||
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
message(STATUS ${CMAKE_MODULE_PATH})
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/
|
||||
${CMAKE_MODULE_PATH})
|
||||
include(UraniumTranslationTools)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
find_package(PythonInterp 3 REQUIRED)
|
||||
|
||||
message("Using python version ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
|
||||
|
||||
# # Checks using pylint
|
||||
# Note that we use exit 0 here to not mark the build as a failure on check failure
|
||||
# In addition, the specified pylint configuration uses the spellchecker plugin. This required python-enchant to be installed.
|
||||
add_custom_target(check)
|
||||
add_custom_command(TARGET check POST_BUILD COMMAND "PYTHONPATH=${CMAKE_SOURCE_DIR}" ${PYTHON_EXECUTABLE} -m pylint --rcfile=${CMAKE_SOURCE_DIR}/pylint.cfg UM --msg-template=\"{path}:{line}: [{msg_id}({symbol}) , {obj}] {msg}\" > ${CMAKE_BINARY_DIR}/pylint.log || exit 0 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
|
||||
# # Check using Mypy
|
||||
add_custom_target(typecheck)
|
||||
add_custom_command(TARGET typecheck POST_BUILD COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
|
||||
# # Tests
|
||||
include(UraniumTests)
|
||||
|
||||
# # Benchmarks
|
||||
# add_custom_target(benchmark)
|
||||
# file(GLOB bench_files tests/benchmarks/*/profile*.py)
|
||||
# foreach(file ${bench_files})
|
||||
# add_custom_command(TARGET benchmark POST_BUILD COMMAND "PYTHONPATH=${CMAKE_SOURCE_DIR}" kernprof ARGS -l -v ${file})
|
||||
# endforeach()
|
||||
|
||||
|
||||
# Documentation
|
||||
find_package(Doxygen)
|
||||
if(${DOXYGEN_FOUND})
|
||||
add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
# Extract Strings
|
||||
add_custom_target(extract-messages ${CMAKE_SOURCE_DIR}/scripts/extract-messages ${CMAKE_SOURCE_DIR} uranium)
|
||||
|
||||
# Build Translations
|
||||
CREATE_TRANSLATION_TARGETS()
|
||||
|
||||
|
||||
if(EXISTS /etc/debian_version)
|
||||
install(DIRECTORY UM DESTINATION lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}/dist-packages)
|
||||
else()
|
||||
install(DIRECTORY UM DESTINATION lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
|
||||
endif()
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/cmake/UraniumTranslationTools.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}/Modules/ )
|
||||
install(DIRECTORY resources DESTINATION ${CMAKE_INSTALL_DATADIR}/uranium)
|
||||
|
||||
# Detect plugins to install
|
||||
include(UraniumPluginInstall)
|
||||
|
||||
include(CPackConfig.cmake)
|
||||
34
CPackConfig.cmake
Normal file
34
CPackConfig.cmake
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
set(CPACK_PACKAGE_VENDOR "Ultimaker")
|
||||
set(CPACK_PACKAGE_CONTACT "Arjen Hiemstra <a.hiemstra@ultimaker.com>")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Uranium 3D Application Framework")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR 15)
|
||||
set(CPACK_PACKAGE_VERSION_MINOR 05)
|
||||
set(CPACK_PACKAGE_VERSION_PATCH 93)
|
||||
set(CPACK_GENERATOR "DEB;RPM")
|
||||
|
||||
set(RPM_REQUIRES
|
||||
"python3 >= 3.5.0"
|
||||
"python3-qt5 >= 5.6.0"
|
||||
"qt5-qtquickcontrols >= 5.6.0"
|
||||
"arcus >= 15.05.90"
|
||||
)
|
||||
string(REPLACE ";" "," RPM_REQUIRES "${RPM_REQUIRES}")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES ${RPM_REQUIRES})
|
||||
|
||||
set(DEB_DEPENDS
|
||||
"python3 (>= 3.5.0)"
|
||||
"python3-pyqt5 (>= 5.6.0)"
|
||||
"python3-pyqt5.qtopengl (>= 5.6.0)"
|
||||
"python3-pyqt5.qtquick (>= 5.6.0)"
|
||||
"python3-pyqt5.qtsvg (>= 5.6.0)"
|
||||
"qml-module-qtquick2 (>= 5.6.0)"
|
||||
"qml-module-qtquick-window2 (>= 5.6.0)"
|
||||
"qml-module-qtquick-layouts (>= 5.6.0)"
|
||||
"qml-module-qtquick-dialogs (>= 5.6.0)"
|
||||
"qml-module-qtquick-controls (>= 5.6.0)"
|
||||
"arcus (>= 15.05.90)"
|
||||
)
|
||||
string(REPLACE ";" "," DEB_DEPENDS "${DEB_DEPENDS}")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DEB_DEPENDS})
|
||||
|
||||
include(CPack)
|
||||
81
Uranium-5.3.0-python3.12.patch
Normal file
81
Uranium-5.3.0-python3.12.patch
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
From 35640ee74899f2a1822d90c32dc1c1fd972e687a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Sun, 9 Jul 2023 12:10:11 +0200
|
||||
Subject: [PATCH 1/2] Fix asserts for called once in Python 3.12
|
||||
|
||||
E AttributeError: 'called_once_with' is not a valid assertion. Use a spec for the mock if 'called_once_with' is meant to be an attribute.. Did you mean: 'assert_called_once_with'?
|
||||
|
||||
FAILED tests/TestBackend.py::test__onSocketStateChanged_listening - Attribute...
|
||||
FAILED tests/TestBackend.py::test_onSocketStateChanged_connected - AttributeE...
|
||||
FAILED tests/Jobs/TestJob.py::test_start - AttributeError: 'called_once_with'...
|
||||
FAILED tests/Jobs/TestJob.py::test_cancel - AttributeError: 'called_once_with...
|
||||
---
|
||||
tests/Jobs/TestJob.py | 4 ++--
|
||||
tests/TestBackend.py | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests/Jobs/TestJob.py b/tests/Jobs/TestJob.py
|
||||
index 45eb8adbac..3502ce35b9 100644
|
||||
--- a/tests/Jobs/TestJob.py
|
||||
+++ b/tests/Jobs/TestJob.py
|
||||
@@ -32,7 +32,7 @@ def test_start():
|
||||
job_queue = MagicMock()
|
||||
with patch("UM.JobQueue.JobQueue.getInstance", MagicMock(return_value = job_queue)):
|
||||
job.start()
|
||||
- job_queue.add.called_once_with(job)
|
||||
+ job_queue.add.assert_called_once_with(job)
|
||||
|
||||
|
||||
def test_cancel():
|
||||
@@ -40,7 +40,7 @@ def test_cancel():
|
||||
job_queue = MagicMock()
|
||||
with patch("UM.JobQueue.JobQueue.getInstance", MagicMock(return_value=job_queue)):
|
||||
job.cancel()
|
||||
- job_queue.remove.called_once_with(job)
|
||||
+ job_queue.remove.assert_called_once_with(job)
|
||||
|
||||
|
||||
def test_isRunning():
|
||||
diff --git a/tests/TestBackend.py b/tests/TestBackend.py
|
||||
index dabb0c870f..ec5b656e7d 100644
|
||||
--- a/tests/TestBackend.py
|
||||
+++ b/tests/TestBackend.py
|
||||
@@ -60,13 +60,13 @@ def test__onSocketStateChanged_listening(backend):
|
||||
backend.startEngine = MagicMock()
|
||||
with patch("UM.Application.Application.getInstance"):
|
||||
backend._onSocketStateChanged(Arcus.SocketState.Listening)
|
||||
- assert backend.startEngine.called_once_with()
|
||||
+ backend.startEngine.assert_called_once_with()
|
||||
|
||||
|
||||
def test_onSocketStateChanged_connected(backend):
|
||||
backend.backendConnected = MagicMock()
|
||||
backend._onSocketStateChanged(Arcus.SocketState.Connected)
|
||||
- assert backend.backendConnected.emit.called_once_with()
|
||||
+ backend.backendConnected.emit.assert_called_once_with()
|
||||
|
||||
|
||||
def test_handleKnownMessage(backend):
|
||||
|
||||
From 70f855230b04c90961e96d96ca14861d08f78ddc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Sun, 9 Jul 2023 12:11:01 +0200
|
||||
Subject: [PATCH 2/2] Comment out a failing assert
|
||||
|
||||
---
|
||||
tests/TestBackend.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/TestBackend.py b/tests/TestBackend.py
|
||||
index ec5b656e7d..77a47e2cda 100644
|
||||
--- a/tests/TestBackend.py
|
||||
+++ b/tests/TestBackend.py
|
||||
@@ -60,7 +60,7 @@ def test__onSocketStateChanged_listening(backend):
|
||||
backend.startEngine = MagicMock()
|
||||
with patch("UM.Application.Application.getInstance"):
|
||||
backend._onSocketStateChanged(Arcus.SocketState.Listening)
|
||||
- backend.startEngine.assert_called_once_with()
|
||||
+ # backend.startEngine.assert_called_once_with() # this fails
|
||||
|
||||
|
||||
def test_onSocketStateChanged_connected(backend):
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
diff -up Uranium-5.3.0/UM/View/RenderBatch.py.glfix Uranium-5.3.0/UM/View/RenderBatch.py
|
||||
--- Uranium-5.3.0/UM/View/RenderBatch.py.glfix 2023-03-06 17:13:21.000000000 -0500
|
||||
+++ Uranium-5.3.0/UM/View/RenderBatch.py 2023-06-05 05:07:35.834427722 -0400
|
||||
@@ -186,10 +186,24 @@ class RenderBatch:
|
||||
|
||||
if self._render_type == self.RenderType.Solid:
|
||||
self._gl.glEnable(self._gl.GL_DEPTH_TEST)
|
||||
- self._gl.glDepthMask(self._gl.GL_TRUE)
|
||||
+ try:
|
||||
+ self._gl.glDepthMask(self._gl.GL_TRUE)
|
||||
+ except:
|
||||
+ Logger.log("w", "glDepthMask does not like ints, trying bytes...")
|
||||
+ try:
|
||||
+ self._gl.glDepthMask(b'1')
|
||||
+ except:
|
||||
+ Logger.log("e", "glDepthMask does not like ints or bytes, no idea what it wants")
|
||||
elif self._render_type == self.RenderType.Transparent:
|
||||
self._gl.glEnable(self._gl.GL_DEPTH_TEST)
|
||||
- self._gl.glDepthMask(self._gl.GL_FALSE)
|
||||
+ try:
|
||||
+ self._gl.glDepthMask(self._gl.GL_FALSE)
|
||||
+ except:
|
||||
+ Logger.log("w", "glDepthMask does not like ints, trying bytes...")
|
||||
+ try:
|
||||
+ self._gl.glDepthMask(b'1')
|
||||
+ except:
|
||||
+ Logger.log("e", "glDepthMask does not like ints or bytes, no idea what it wants")
|
||||
elif self._render_type == self.RenderType.Overlay:
|
||||
self._gl.glDisable(self._gl.GL_DEPTH_TEST)
|
||||
|
||||
diff -up Uranium-5.3.0/UM/View/RenderPass.py.glfix Uranium-5.3.0/UM/View/RenderPass.py
|
||||
--- Uranium-5.3.0/UM/View/RenderPass.py.glfix 2023-03-06 17:13:21.000000000 -0500
|
||||
+++ Uranium-5.3.0/UM/View/RenderPass.py 2023-06-05 05:07:35.835427733 -0400
|
||||
@@ -93,8 +93,22 @@ class RenderPass:
|
||||
self._fbo.bind()
|
||||
|
||||
# Ensure we can actually write to the relevant FBO components.
|
||||
- self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE,self._gl.GL_TRUE, self._gl.GL_TRUE)
|
||||
- self._gl.glDepthMask(self._gl.GL_TRUE)
|
||||
+ try:
|
||||
+ self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE,self._gl.GL_TRUE, self._gl.GL_TRUE)
|
||||
+ except:
|
||||
+ Logger.log("w", "glColorMask does not like ints, trying bytes...")
|
||||
+ try:
|
||||
+ self._gl.glColorMask(b'1', b'1',b'1', b'1')
|
||||
+ except:
|
||||
+ Logger.log("e", "glColorMask does not like ints or bytes, no idea what it wants")
|
||||
+ try:
|
||||
+ self._gl.glDepthMask(self._gl.GL_TRUE)
|
||||
+ except:
|
||||
+ Logger.log("w", "glDepthMask does not like ints, trying bytes...")
|
||||
+ try:
|
||||
+ self._gl.glDepthMask(b'1')
|
||||
+ except:
|
||||
+ Logger.log("e", "glDepthMask does not like ints or bytes, no idea what it wants")
|
||||
|
||||
self._gl.glClear(self._gl.GL_COLOR_BUFFER_BIT | self._gl.GL_DEPTH_BUFFER_BIT)
|
||||
|
||||
diff -up Uranium-5.3.0/UM/View/SelectionPass.py.glfix Uranium-5.3.0/UM/View/SelectionPass.py
|
||||
--- Uranium-5.3.0/UM/View/SelectionPass.py.glfix 2023-03-06 17:13:21.000000000 -0500
|
||||
+++ Uranium-5.3.0/UM/View/SelectionPass.py 2023-06-05 05:07:59.406694028 -0400
|
||||
@@ -5,6 +5,7 @@ import enum
|
||||
import random
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
+from UM.Logger import Logger
|
||||
from UM.Resources import Resources
|
||||
from UM.Application import Application
|
||||
|
||||
@@ -109,13 +110,27 @@ class SelectionPass(RenderPass):
|
||||
if selectable_objects:
|
||||
batch.render(self._scene.getActiveCamera())
|
||||
|
||||
- self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_FALSE)
|
||||
+ try:
|
||||
+ self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_FALSE)
|
||||
+ except:
|
||||
+ Logger.log("w", "glColorMask does not like ints, trying bytes...")
|
||||
+ try:
|
||||
+ self._gl.glColorMask(b'1', b'1', b'1', b'0')
|
||||
+ except:
|
||||
+ Logger.log("e", "glColorMask does not like ints or bytes, no idea what it wants")
|
||||
self._gl.glDisable(self._gl.GL_DEPTH_TEST)
|
||||
|
||||
tool_handle.render(self._scene.getActiveCamera())
|
||||
|
||||
self._gl.glEnable(self._gl.GL_DEPTH_TEST)
|
||||
- self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE)
|
||||
+ try:
|
||||
+ self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE)
|
||||
+ except:
|
||||
+ Logger.log("w", "glColorMask does not like ints, trying bytes...")
|
||||
+ try:
|
||||
+ self._gl.glColorMask(b'1', b'1', b'1', b'1')
|
||||
+ except:
|
||||
+ Logger.log("e", "glColorMask does not like ints or bytes, no idea what it wants")
|
||||
|
||||
self.release()
|
||||
|
||||
53
Uranium-5.6.0-pytest8.patch
Normal file
53
Uranium-5.6.0-pytest8.patch
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
From dd2c31bc0f38d11c8351d89fae3d92cd12da885e Mon Sep 17 00:00:00 2001
|
||||
From: Remco Burema <r.burema@ultimaker.com>
|
||||
Date: Wed, 21 Feb 2024 11:39:49 +0100
|
||||
Subject: [PATCH 1/3] Protobuf version mismatch caused tests,builds to fail.
|
||||
|
||||
---
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tests/conftest.py b/tests/conftest.py
|
||||
index 4fcd4cefd..4f500fabc 100644
|
||||
--- a/tests/conftest.py
|
||||
+++ b/tests/conftest.py
|
||||
@@ -59,3 +59,17 @@ def upgrade_manager(application):
|
||||
upgrade_manager = VersionUpgradeManager(application)
|
||||
return upgrade_manager
|
||||
|
||||
+def pytest_collection_modifyitems(items):
|
||||
+ """ Modifies test items in place to ensure test classes run in a given order.
|
||||
+ See: https://stackoverflow.com/questions/70738211/run-pytest-classes-in-custom-order/70758938#70758938
|
||||
+ """
|
||||
+ CLASS_ORDER = ["TestActiveToolProxy"] # All classes that need to be run in-order, in that order -- all others will run _before_.
|
||||
+ class_mapping = {item: item.cls.__name__ for item in items}
|
||||
+
|
||||
+ sorted_items = items.copy()
|
||||
+ # Iteratively move tests of each class to the end of the test queue
|
||||
+ for class_ in CLASS_ORDER:
|
||||
+ sorted_items = [it for it in sorted_items if class_mapping[it] != class_] + [
|
||||
+ it for it in sorted_items if class_mapping[it] == class_
|
||||
+ ]
|
||||
+ items[:] = sorted_items
|
||||
|
||||
From cd4eb2cf8c450c23a3f2d42619ee36ec93d49a6d Mon Sep 17 00:00:00 2001
|
||||
From: Remco Burema <r.burema@ultimaker.com>
|
||||
Date: Wed, 21 Feb 2024 16:22:24 +0100
|
||||
Subject: [PATCH 3/3] Not all our tests are classes.
|
||||
|
||||
---
|
||||
tests/conftest.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/conftest.py b/tests/conftest.py
|
||||
index 4f500fabc..d26f2545a 100644
|
||||
--- a/tests/conftest.py
|
||||
+++ b/tests/conftest.py
|
||||
@@ -64,7 +64,7 @@ def pytest_collection_modifyitems(items):
|
||||
See: https://stackoverflow.com/questions/70738211/run-pytest-classes-in-custom-order/70758938#70758938
|
||||
"""
|
||||
CLASS_ORDER = ["TestActiveToolProxy"] # All classes that need to be run in-order, in that order -- all others will run _before_.
|
||||
- class_mapping = {item: item.cls.__name__ for item in items}
|
||||
+ class_mapping = {item: (item.cls.__name__ if item.cls else "") for item in items}
|
||||
|
||||
sorted_items = items.copy()
|
||||
# Iteratively move tests of each class to the end of the test queue
|
||||
99
UraniumPluginInstall.cmake
Normal file
99
UraniumPluginInstall.cmake
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# UraniumPluginInstall.cmake is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
#
|
||||
# This module detects all plugins that need to be installed and adds them using the CMake install() command.
|
||||
# It detects all plugin folder in the path "plugins/*" where there's a "plugin.json" in it.
|
||||
#
|
||||
# Plugins can be configured to NOT BE INSTALLED via the variable "UM_NO_INSTALL_PLUGINS" as a list of string in the
|
||||
# form of "a;b;c" or "a,b,c". By default all plugins will be installed.
|
||||
#
|
||||
|
||||
# FIXME: Remove the code for CMake <3.12 once we have switched over completely.
|
||||
# FindPython3 is a new module since CMake 3.12. It deprecates FindPythonInterp and FindPythonLibs. The FindPython3
|
||||
# module is copied from the CMake repository here so in CMake <3.12 we can still use it.
|
||||
if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||
# Use FindPythonInterp and FindPythonLibs for CMake <3.12
|
||||
find_package(PythonInterp 3 REQUIRED)
|
||||
|
||||
set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
else()
|
||||
# Use FindPython3 for CMake >=3.12
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
endif()
|
||||
|
||||
# Options or configuration variables
|
||||
set(UM_NO_INSTALL_PLUGINS "" CACHE STRING "A list of plugins that should not be installed, separated with ';' or ','.")
|
||||
|
||||
file(GLOB_RECURSE _plugin_json_list ${CMAKE_SOURCE_DIR}/plugins/*/plugin.json)
|
||||
list(LENGTH _plugin_json_list _plugin_json_list_len)
|
||||
|
||||
# Sort the lists alphabetically so we can handle cases like this:
|
||||
# - plugins/my_plugin/plugin.json
|
||||
# - plugins/my_plugin/my_module/plugin.json
|
||||
# In this case, only "plugins/my_plugin" should be added via install().
|
||||
set(_no_install_plugin_list ${UM_NO_INSTALL_PLUGINS})
|
||||
# Sanitize the string so the comparison will be case-insensitive.
|
||||
string(STRIP "${_no_install_plugin_list}" _no_install_plugin_list)
|
||||
string(TOLOWER "${_no_install_plugin_list}" _no_install_plugin_list)
|
||||
|
||||
# WORKAROUND counterpart of what's in cura-build.
|
||||
string(REPLACE "," ";" _no_install_plugin_list "${_no_install_plugin_list}")
|
||||
|
||||
list(LENGTH _no_install_plugin_list _no_install_plugin_list_len)
|
||||
|
||||
if(_no_install_plugin_list_len GREATER 0)
|
||||
list(SORT _no_install_plugin_list)
|
||||
endif()
|
||||
if(_plugin_json_list_len GREATER 0)
|
||||
list(SORT _plugin_json_list)
|
||||
endif()
|
||||
|
||||
# Check all plugin directories and add them via install() if needed.
|
||||
set(_install_plugin_list "")
|
||||
foreach(_plugin_json_path ${_plugin_json_list})
|
||||
get_filename_component(_plugin_dir ${_plugin_json_path} DIRECTORY)
|
||||
file(RELATIVE_PATH _rel_plugin_dir ${CMAKE_CURRENT_SOURCE_DIR} ${_plugin_dir})
|
||||
get_filename_component(_plugin_dir_name ${_plugin_dir} NAME)
|
||||
|
||||
# Make plugin name comparison case-insensitive
|
||||
string(TOLOWER "${_plugin_dir_name}" _plugin_dir_name_lowercase)
|
||||
|
||||
# Check if this plugin needs to be skipped for installation
|
||||
set(_add_plugin ON) # Indicates if this plugin should be added to the build or not.
|
||||
set(_is_no_install_plugin OFF) # If this plugin will not be added, this indicates if it's because the plugin is
|
||||
# specified in the NO_INSTALL_PLUGINS list.
|
||||
if(_no_install_plugin_list)
|
||||
if("${_plugin_dir_name_lowercase}" IN_LIST _no_install_plugin_list)
|
||||
set(_add_plugin OFF)
|
||||
set(_is_no_install_plugin ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Make sure this is not a subdirectory in a plugin that's already in the install list
|
||||
if(_add_plugin)
|
||||
foreach(_known_install_plugin_dir ${_install_plugin_list})
|
||||
if(_plugin_dir MATCHES "${_known_install_plugin_dir}.+")
|
||||
set(_add_plugin OFF)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(_add_plugin)
|
||||
message(STATUS "[+] PLUGIN TO INSTALL: ${_rel_plugin_dir}")
|
||||
get_filename_component(_rel_plugin_parent_dir ${_rel_plugin_dir} DIRECTORY)
|
||||
install(DIRECTORY ${_rel_plugin_dir}
|
||||
DESTINATION lib${LIB_SUFFIX}/uranium/${_rel_plugin_parent_dir}
|
||||
PATTERN "__pycache__" EXCLUDE
|
||||
PATTERN "*.qmlc" EXCLUDE
|
||||
)
|
||||
list(APPEND _install_plugin_list ${_plugin_dir})
|
||||
elseif(_is_no_install_plugin)
|
||||
message(STATUS "[-] PLUGIN TO REMOVE : ${_rel_plugin_dir}")
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/mod_bundled_packages_json.py
|
||||
-d ${CMAKE_CURRENT_SOURCE_DIR}/resources/bundled_packages
|
||||
${_plugin_dir_name}
|
||||
RESULT_VARIABLE _mod_json_result)
|
||||
endif()
|
||||
endforeach()
|
||||
56
UraniumTests.cmake
Normal file
56
UraniumTests.cmake
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Uranium is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
enable_testing()
|
||||
include(CMakeParseArguments)
|
||||
|
||||
add_custom_target(test-verbose COMMAND ${CMAKE_CTEST_COMMAND} --verbose)
|
||||
|
||||
function(uranium_add_test)
|
||||
set(_single_args NAME DIRECTORY PYTHONPATH)
|
||||
cmake_parse_arguments("" "" "${_single_args}" "" ${ARGN})
|
||||
|
||||
if(NOT _NAME)
|
||||
message(FATAL_ERROR "UraniumAddTest requires a test name argument")
|
||||
endif()
|
||||
|
||||
if(NOT _DIRECTORY)
|
||||
message(FATAL_ERROR "UraniumAddTest requires a directory to test")
|
||||
endif()
|
||||
|
||||
if(NOT _PYTHONPATH)
|
||||
set(_PYTHONPATH ${_DIRECTORY})
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
string(REPLACE "|" "\\;" _PYTHONPATH ${_PYTHONPATH})
|
||||
set(_PYTHONPATH "${_PYTHONPATH}\\;$ENV{PYTHONPATH}")
|
||||
else()
|
||||
string(REPLACE "|" ":" _PYTHONPATH ${_PYTHONPATH})
|
||||
set(_PYTHONPATH "${_PYTHONPATH}:$ENV{PYTHONPATH}")
|
||||
endif()
|
||||
|
||||
add_test(
|
||||
NAME ${_NAME}
|
||||
COMMAND ${PYTHON_EXECUTABLE} -m pytest --junitxml=${CMAKE_BINARY_DIR}/junit-${_NAME}.xml ${_DIRECTORY}
|
||||
)
|
||||
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT LANG=C)
|
||||
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT "PYTHONPATH=${_PYTHONPATH}")
|
||||
endfunction()
|
||||
|
||||
uranium_add_test(NAME pytest-main DIRECTORY ${CMAKE_SOURCE_DIR}/tests PYTHONPATH ${CMAKE_SOURCE_DIR})
|
||||
|
||||
file(GLOB_RECURSE _plugins plugins/*/__init__.py)
|
||||
foreach(_plugin ${_plugins})
|
||||
get_filename_component(_plugin_directory ${_plugin} DIRECTORY)
|
||||
if(EXISTS ${_plugin_directory}/tests)
|
||||
get_filename_component(_plugin_name ${_plugin_directory} NAME)
|
||||
uranium_add_test(NAME pytest-${_plugin_name} DIRECTORY ${_plugin_directory} PYTHONPATH "${CMAKE_SOURCE_DIR}|${_plugin_directory}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#Add code style test.
|
||||
add_test(
|
||||
NAME "code-style"
|
||||
COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
114
UraniumTranslationTools.cmake
Normal file
114
UraniumTranslationTools.cmake
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
## 3rd party code:
|
||||
|
||||
# Macro needed to list all sub-directory of a directory.
|
||||
# There is no function in cmake as far as I know.
|
||||
# Found at: http://stackoverflow.com/a/7788165
|
||||
MACRO(SUBDIRLIST result curdir)
|
||||
FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
|
||||
SET(dirlist "")
|
||||
FOREACH(child ${children})
|
||||
IF(IS_DIRECTORY ${curdir}/${child})
|
||||
STRING(REPLACE "/" "" child ${child})
|
||||
LIST(APPEND dirlist ${child})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
SET(${result} ${dirlist})
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
## Translation tools:
|
||||
|
||||
SET(CURA_BINARY_DATA_DIRECTORY CACHE PATH "Directory to the cura-binary-data repository")
|
||||
|
||||
if(NOT CURA_BINARY_DATA_DIRECTORY AND NOT DEFINED $ENV{CURA_BINARY_DATA_DIRECTORY})
|
||||
message(STATUS "Using CURA_BINARY_DATA_DIRECTORY from set of environment variables...")
|
||||
SET(CURA_BINARY_DATA_DIRECTORY $ENV{CURA_BINARY_DATA_DIRECTORY})
|
||||
endif()
|
||||
|
||||
# Dynamically creates targets for each language to create a *.po-file
|
||||
MACRO(TARGETS_FOR_PO_FILES language)
|
||||
if(DEFINED GETTEXT_MSGINIT_EXECUTABLE)
|
||||
message(STATUS "Creating target i18n-create-po-${language}")
|
||||
add_custom_target(i18n-create-po-${language})
|
||||
add_dependencies(i18n-create-po i18n-create-po-${language})
|
||||
endif()
|
||||
message(STATUS "Creating target i18n-update-po-${language}")
|
||||
add_custom_target(i18n-update-po-${language})
|
||||
add_dependencies(i18n-update-po i18n-update-po-${language})
|
||||
foreach(pot_file ${pot_files})
|
||||
string(REGEX REPLACE ".*/(.*).pot" "${CMAKE_SOURCE_DIR}/resources/i18n/${language}/\\1.po" po_file ${pot_file})
|
||||
if(DEFINED GETTEXT_MSGINIT_EXECUTABLE)
|
||||
add_custom_command(TARGET i18n-create-po-${language} POST_BUILD
|
||||
COMMAND ${GETTEXT_MSGINIT_EXECUTABLE} ARGS --no-wrap --no-translator -l ${language} -i ${pot_file} -o ${po_file})
|
||||
endif()
|
||||
add_custom_command(TARGET i18n-update-po-${language} POST_BUILD
|
||||
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} ARGS --no-wrap --no-fuzzy-matching -o ${po_file} ${po_file} ${pot_file})
|
||||
endforeach()
|
||||
ENDMACRO()
|
||||
|
||||
# Dynamically creates targets for each language to create a *.mo-file
|
||||
MACRO(TARGETS_FOR_MO_FILES language)
|
||||
message(STATUS "Creating target i18n-create-mo-${language}")
|
||||
add_custom_target(i18n-create-mo-${language})
|
||||
add_dependencies(i18n-create-mo i18n-create-mo-${language})
|
||||
if(TARGET i18n-copy-mo)
|
||||
message(STATUS "Creating target i18n-copy-mo-${language}")
|
||||
add_custom_target(i18n-copy-mo-${language})
|
||||
add_dependencies(i18n-copy-mo i18n-copy-mo-${language})
|
||||
endif()
|
||||
file(GLOB po_files ${CMAKE_SOURCE_DIR}/resources/i18n/${language}/*.po)
|
||||
foreach(po_file ${po_files})
|
||||
string(REGEX REPLACE ".*/(.*).po" "${CMAKE_BINARY_DIR}/resources/i18n/${language}/LC_MESSAGES/\\1.mo" mo_file ${po_file})
|
||||
add_custom_command(TARGET i18n-create-mo-${language} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/resources/i18n/${language}/LC_MESSAGES/
|
||||
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} ARGS ${po_file} -o ${mo_file} -f)
|
||||
if(TARGET i18n-copy-mo-${language})
|
||||
string(REGEX REPLACE ".*/(.*).po" "${CURA_BINARY_DATA_DIRECTORY}/${PROJECT_NAME}/resources/i18n/${language}/LC_MESSAGES/\\1.mo" mo_file_binary_copy ${po_file})
|
||||
add_custom_command(TARGET i18n-copy-mo-${language} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CURA_BINARY_DATA_DIRECTORY}/resources/i18n/${language}/LC_MESSAGES/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${mo_file} ${mo_file_binary_copy})
|
||||
add_dependencies(i18n-copy-mo-${language} i18n-create-mo-${language})
|
||||
endif()
|
||||
endforeach()
|
||||
ENDMACRO()
|
||||
|
||||
# Checks for availability of gettext and when found creates all targets
|
||||
# TODO: Adding option to set the PROJECT_NAME externally!
|
||||
MACRO(CREATE_TRANSLATION_TARGETS)
|
||||
find_package(Gettext)
|
||||
|
||||
if(GETTEXT_FOUND)
|
||||
# translations target will convert .po files into .mo and .qm as needed.
|
||||
# The files are checked for a _qt suffix and if it is found, converted to
|
||||
# qm, otherwise they are converted to .po.
|
||||
if(DEFINED GETTEXT_MSGINIT_EXECUTABLE)
|
||||
message(STATUS "Creating target i18n-create-po")
|
||||
add_custom_target(i18n-create-po)
|
||||
else()
|
||||
message(WARNING "GETTEXT_MSGINIT_EXECUTABLE is undefined!\nSkipping to create i18n-create-po* targets...")
|
||||
endif()
|
||||
if(CURA_BINARY_DATA_DIRECTORY)
|
||||
if(EXISTS ${CURA_BINARY_DATA_DIRECTORY})
|
||||
message(STATUS "CURA_BINARY_DATA_DIRECTORY: ${CURA_BINARY_DATA_DIRECTORY}")
|
||||
message(STATUS "Creating target i18n-copy-mo")
|
||||
add_custom_target(i18n-copy-mo)
|
||||
else()
|
||||
message(WARNING "CURA_BINARY_DATA_DIRECTORY does not exist! (${CURA_BINARY_DATA_DIRECTORY})")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "CURA_BINARY_DATA_DIRECTORY is not set!")
|
||||
endif()
|
||||
message(STATUS "Creating target i18n-update-po")
|
||||
add_custom_target(i18n-update-po)
|
||||
message(STATUS "Creating target i18n-create-mo")
|
||||
add_custom_target(i18n-create-mo ALL)
|
||||
|
||||
SUBDIRLIST(languages ${CMAKE_SOURCE_DIR}/resources/i18n/)
|
||||
file(GLOB pot_files ${CMAKE_SOURCE_DIR}/resources/i18n/*.pot)
|
||||
foreach(language ${languages})
|
||||
TARGETS_FOR_PO_FILES(${language})
|
||||
TARGETS_FOR_MO_FILES(${language})
|
||||
endforeach()
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/resources DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/)
|
||||
endif()
|
||||
ENDMACRO()
|
||||
184
changelog
Normal file
184
changelog
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed Jun 28 2023 Python Maint <python-maint@redhat.com> - 5.3.0-6
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Mon Jun 5 2023 Tom Callaway <spot@fedoraproject.org> - 5.3.0-5
|
||||
- fix issue where Logger was used but not imported (thanks to H. Peter Anvin)
|
||||
|
||||
* Wed May 31 2023 Tom Callaway <spot@fedoraproject.org> - 5.3.0-4
|
||||
- try ints, then bytes for gl mask functions
|
||||
|
||||
* Mon May 22 2023 Tom Callaway <spot@fedoraproject.org> - 5.3.0-3
|
||||
- try to hack qt6.5 support
|
||||
|
||||
* Thu Mar 9 2023 Tom Callaway <spot@fedoraproject.org> - 5.3.0-2
|
||||
- make pyclipper an explicit Requires
|
||||
|
||||
* Wed Mar 8 2023 Tom Callaway <spot@fedoraproject.org> - 5.3.0-1
|
||||
- update to 5.3.0
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Fri Jun 17 2022 Python Maint <python-maint@redhat.com> - 4.13.1-3
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Wed Mar 02 2022 Miro Hrončok <mhroncok@redhat.com> - 4.13.1-2
|
||||
- Fix build with cmake 3.23.0rc2
|
||||
- Related: rhbz#2059201, rhbz#2059188, rhbz#2057738
|
||||
|
||||
* Tue Feb 01 2022 Gabriel Féron <feron.gabriel@gmail.com> - 4.13.1-1
|
||||
- Update to 4.13.1
|
||||
|
||||
* Fri Jan 21 2022 Gabriel Féron <feron.gabriel@gmail.com> - 4.13.0-1
|
||||
- Update to 4.13.0
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Mon Dec 13 2021 Gabriel Féron <feron.gabriel@gmail.com> - 4.12.1-1
|
||||
- Update to 4.12.1
|
||||
|
||||
* Mon Nov 08 2021 Miro Hrončok <mhroncok@redhat.com> - 4.11.0-2
|
||||
- Round coordinates on getFaceIdAtPosition, to fix crash with Python 3.10+
|
||||
- Fixes a crash when using "Select face to align to the build plate" tool
|
||||
- Fixes rhbz#2021157
|
||||
|
||||
* Wed Sep 15 2021 Gabriel Féron <feron.gabriel@gmail.com> - 4.11.0-1
|
||||
- Update to 4.11.0
|
||||
|
||||
* Mon Aug 16 2021 Gabriel Féron <feron.gabriel@gmail.com> - 4.10.0-1
|
||||
- Update to 4.10.0
|
||||
|
||||
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.1-2
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Thu Jun 10 2021 Gabriel Féron <feron.gabriel@gmail.com> - 4.9.1-1
|
||||
- Update to 4.9.1
|
||||
|
||||
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 4.9.0-2
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
* Mon Apr 26 2021 Gabriel Féron <feron.gabriel@gmail.com> - 4.9.0-1
|
||||
- Update to 4.9.0
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Dec 22 2020 Jan Pazdziora <jpazdziora@redhat.com> - 4.8.0-1
|
||||
- Update to 4.8.0
|
||||
|
||||
* Fri Nov 27 2020 Miro Hrončok <mhroncok@redhat.com> - 4.7.1-2
|
||||
- Round coordinates before creating QPoint
|
||||
- Fixes a test failure with Python 3.10
|
||||
|
||||
* Thu Sep 03 2020 Miro Hrončok <mhroncok@redhat.com> - 4.7.1-1
|
||||
- Update to 4.7.1
|
||||
|
||||
* Mon Aug 31 2020 Gabriel Féron <feron.gabriel@gmail.com> - 4.7.0-1
|
||||
- Update to 4.7.0
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.6.1-2
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Tue May 5 2020 Gabriel Féron <feron.gabriel@gmail.com> - 4.6.0-1
|
||||
- Update to 4.6.1
|
||||
|
||||
* Tue Apr 21 2020 Gabriel Féron <feron.gabriel@gmail.com> - 4.6.0-1
|
||||
- Update to 4.6.0
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Nov 21 2019 Gabriel Féron <feron.gabriel@gmail.com> - 4.4.0-1
|
||||
- Update to 4.4.0
|
||||
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1.0-3
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Jun 18 2019 Gabriel Féron <feron.gabriel@gmail.com> - 4.1.0-1
|
||||
- Update to 4.1.0
|
||||
|
||||
* Wed Apr 03 2019 Gabriel Féron <feron.gabriel@gmail.com> - 4.0.0-1
|
||||
- Update to 4.0.0
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sat Jan 26 2019 Gabriel Féron <feron.gabriel@gmail.com> - 3.6.0-1
|
||||
- Update to 3.6.0
|
||||
|
||||
* Mon Nov 12 2018 Miro Hrončok <mhroncok@redhat.com> - 3.5.1-1
|
||||
- Update to 3.5.1 (#1644323)
|
||||
|
||||
* Tue Aug 28 2018 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-1
|
||||
- Update to 3.4.1 (#1599724)
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.0-4
|
||||
- Rebuilt for Python 3.7
|
||||
|
||||
* Thu Jun 07 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.0-3
|
||||
- Bytecompile the plugins explicitly
|
||||
|
||||
* Mon May 28 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.0-2
|
||||
- Fix PluginRegistry test
|
||||
|
||||
* Wed May 02 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.0-1
|
||||
- Update to 3.3.0 (#1571792)
|
||||
- Skip test_emptyPlugin
|
||||
|
||||
* Mon Mar 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.2.1-1
|
||||
- Update to 3.2.1 (#1523904)
|
||||
- Force install to /usr/lib and keep this noarch
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Sun Dec 10 2017 Miro Hrončok <mhroncok@redhat.com> - 3.1.0-1
|
||||
- Update to 3.1.0 (#1523904)
|
||||
- No need to sed dist-packages out anymore
|
||||
- getMimeTypeForFile fails no more
|
||||
- but some others tests are, add a fix
|
||||
|
||||
* Fri Oct 20 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.0.3-1
|
||||
- Update to 3.0.3 (#1504439)
|
||||
|
||||
* Wed Aug 30 2017 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-2
|
||||
- Relocate Japanese locale to ja
|
||||
|
||||
* Wed Aug 30 2017 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-1
|
||||
- Update to 2.7.0 (#1486741)
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Wed Jun 28 2017 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-2
|
||||
- Fix the test_uniqueName test failure
|
||||
|
||||
* Wed Jun 28 2017 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-1
|
||||
- Update to 2.6.1
|
||||
- Skip test_uniqueName test (reported)
|
||||
|
||||
* Tue Jun 27 2017 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-1
|
||||
- Update to 2.6.0
|
||||
|
||||
* Wed May 03 2017 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-2
|
||||
- Actually include the cmake files (needed for cura)
|
||||
|
||||
* Wed Apr 26 2017 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-1
|
||||
- Initial package
|
||||
69
mod_bundled_packages_json.py
Normal file
69
mod_bundled_packages_json.py
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# This script removes the given package entries in the bundled_packages JSON files. This is used by the PluginInstall
|
||||
# CMake module.
|
||||
#
|
||||
|
||||
import argparse
|
||||
import collections
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
## Finds all JSON files in the given directory recursively and returns a list of those files in absolute paths.
|
||||
#
|
||||
# \param work_dir The directory to look for JSON files recursively.
|
||||
# \return A list of JSON files in absolute paths that are found in the given directory.
|
||||
def find_json_files(work_dir: str) -> list:
|
||||
json_file_list = []
|
||||
for root, dir_names, file_names in os.walk(work_dir):
|
||||
for file_name in file_names:
|
||||
abs_path = os.path.abspath(os.path.join(root, file_name))
|
||||
json_file_list.append(abs_path)
|
||||
return json_file_list
|
||||
|
||||
|
||||
## Removes the given entries from the given JSON file. The file will modified in-place.
|
||||
#
|
||||
# \param file_path The JSON file to modify.
|
||||
# \param entries A list of strings as entries to remove.
|
||||
# \return None
|
||||
def remove_entries_from_json_file(file_path: str, entries: list) -> None:
|
||||
try:
|
||||
with open(file_path, "r", encoding = "utf-8") as f:
|
||||
package_dict = json.load(f, object_hook = collections.OrderedDict)
|
||||
except Exception as e:
|
||||
msg = "Failed to load '{file_path}' as a JSON file. This file will be ignored Exception: {e}"\
|
||||
.format(file_path = file_path, e = e)
|
||||
sys.stderr.write(msg + os.linesep)
|
||||
return
|
||||
|
||||
for entry in entries:
|
||||
if entry in package_dict:
|
||||
del package_dict[entry]
|
||||
print("[INFO] Remove entry [{entry}] from [{file_path}]".format(file_path = file_path, entry = entry))
|
||||
|
||||
try:
|
||||
with open(file_path, "w", encoding = "utf-8", newline = "\n") as f:
|
||||
json.dump(package_dict, f, indent = 4)
|
||||
except Exception as e:
|
||||
msg = "Failed to write '{file_path}' as a JSON file. Exception: {e}".format(file_path = file_path, e = e)
|
||||
raise IOError(msg)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser("mod_bundled_packages_json")
|
||||
parser.add_argument("-d", "--dir", dest = "work_dir",
|
||||
help = "The directory to look for bundled packages JSON files, recursively.")
|
||||
parser.add_argument("entries", metavar = "ENTRIES", type = str, nargs = "+")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
json_file_list = find_json_files(args.work_dir)
|
||||
for json_file_path in json_file_list:
|
||||
remove_entries_from_json_file(json_file_path, args.entries)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -1,29 +1,56 @@
|
|||
Name: python-uranium
|
||||
Version: 3.0.3
|
||||
Release: 1%{?dist}
|
||||
Version: 5.6.0
|
||||
Release: %autorelease
|
||||
Summary: A Python framework for building desktop applications
|
||||
License: LGPLv3+
|
||||
License: LGPL-3.0-or-later
|
||||
URL: https://github.com/Ultimaker/Uranium
|
||||
Source0: %{url}/archive/%{version}.tar.gz#/Uranium-%{version}.tar.gz
|
||||
Source: %{url}/archive/%{version}.tar.gz#/Uranium-%{version}.tar.gz
|
||||
Patch: Uranium-5.3.0-qt-try-ints-then-bytes-for-gl-mask-functions.patch
|
||||
# Fix asserts for called once in Python 3.12:
|
||||
Patch: https://github.com/Ultimaker/Uranium/pull/885.patch#/Uranium-5.3.0-python3.12.patch
|
||||
# Force test order to fix FTBFS with pytest 8
|
||||
# From https://github.com/Ultimaker/Uranium/pull/941
|
||||
Patch: Uranium-5.6.0-pytest8.patch
|
||||
# Fix for Python 3.14
|
||||
Patch: https://github.com/Ultimaker/Uranium/pull/997.patch
|
||||
|
||||
# Cmake bits taken from 4.13.1, before upstream went nuts with conan
|
||||
Source2: mod_bundled_packages_json.py
|
||||
Source3: UraniumPluginInstall.cmake
|
||||
Source4: UraniumTests.cmake
|
||||
Source5: UraniumTranslationTools.cmake
|
||||
Source6: CMakeLists.txt
|
||||
Source7: CPackConfig.cmake
|
||||
Source8: Doxyfile
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: /usr/bin/doxygen
|
||||
BuildRequires: /usr/bin/msgmerge
|
||||
BuildRequires: cmake
|
||||
BuildRequires: git
|
||||
BuildRequires: git-core
|
||||
|
||||
# UM/PluginRegistry.py imports from imp
|
||||
# https://github.com/Ultimaker/Uranium/issues/765
|
||||
# https://github.com/Ultimaker/Uranium/pull/915
|
||||
BuildRequires: (python3-zombie-imp if python3 >= 3.12)
|
||||
|
||||
# Tests
|
||||
BuildRequires: python3-arcus == %{version}
|
||||
BuildRequires: python3-arcus >= 5.3.0
|
||||
BuildRequires: python3-cryptography
|
||||
BuildRequires: python3-numpy
|
||||
BuildRequires: python3-scipy
|
||||
BuildRequires: python3-qt5
|
||||
BuildRequires: python3-shapely
|
||||
BuildRequires: python3-pyclipper
|
||||
BuildRequires: python3-pyqt6-devel
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-pytest-benchmark
|
||||
BuildRequires: python3-twisted
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
# There are Python plugins in /usr/lib/uranium
|
||||
# We need to byte-compile it with Python 3
|
||||
%global __python %{__python3}
|
||||
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||
ExcludeArch: %{ix86}
|
||||
|
||||
%description
|
||||
Uranium is a Python framework for building 3D printing related applications.
|
||||
|
|
@ -31,12 +58,15 @@ Uranium is a Python framework for building 3D printing related applications.
|
|||
%package -n python3-uranium
|
||||
Summary: %{summary}
|
||||
Provides: uranium = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-uranium}
|
||||
|
||||
Requires: python3-arcus == %{version}
|
||||
Requires: python3-arcus >= 5.3.0
|
||||
Requires: python3-cryptography
|
||||
Requires: python3-numpy
|
||||
Requires: python3-scipy
|
||||
Requires: python3-qt5
|
||||
Requires: python3-shapely
|
||||
Requires: python3-pyclipper
|
||||
Requires: python3-pyqt6
|
||||
Requires: (python3-zombie-imp if python3 >= 3.12)
|
||||
Recommends: python3-numpy-stl
|
||||
|
||||
%description -n python3-uranium
|
||||
|
|
@ -52,31 +82,32 @@ related applications.
|
|||
%prep
|
||||
%autosetup -n Uranium-%{version} -p1 -S git
|
||||
|
||||
# Upstream installs to lib/python3/dist-packages
|
||||
# We want to install to %%{python3_sitelib}
|
||||
sed -i 's|lib/python${PYTHON_VERSION_MAJOR}/dist-packages|%(echo %{python3_sitelib} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt
|
||||
mkdir cmake
|
||||
cp -a %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} cmake/
|
||||
rm -rf CMakeLists.txt
|
||||
cp -a %{SOURCE6} %{SOURCE7} %{SOURCE8} .
|
||||
|
||||
# empty file. appending to the end to make sure we are not overriding
|
||||
# a non empty file in the future
|
||||
echo '# empty' >> UM/Settings/ContainerRegistryInterface.py
|
||||
# fix compile-shaders
|
||||
sed -i 's|qsb |qsb-qt6 |g' scripts/compile-shaders
|
||||
|
||||
%build
|
||||
%{cmake} .
|
||||
make %{?_smp_mflags}
|
||||
make doc
|
||||
# there is no arch specific content, so we set LIB_SUFFIX to nothing
|
||||
# see https://github.com/Ultimaker/Uranium/commit/862a246bdfd7e25541b04a35406957612c6f4bb7
|
||||
%cmake -DLIB_SUFFIX:STR=
|
||||
%cmake_build
|
||||
%cmake_build -- doc
|
||||
|
||||
%check
|
||||
pip3 freeze
|
||||
%{python3} -m pip freeze
|
||||
|
||||
|
||||
# The failing tests are reported at:
|
||||
# https://github.com/Ultimaker/Uranium/issues/225
|
||||
# Skipping
|
||||
%{__python3} -m pytest -v -k "not getMimeTypeForFile"
|
||||
# skipping failing tests, see:
|
||||
# * https://github.com/Ultimaker/Uranium/issues/594
|
||||
# * https://github.com/Ultimaker/Uranium/issues/603
|
||||
%{python3} -m pytest -v -k "not (TestSettingFunction and test_init_bad) and not TestHttpRequestManager"
|
||||
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
%cmake_install
|
||||
|
||||
# Move the cmake files
|
||||
mv %{buildroot}%{_datadir}/cmake* %{buildroot}%{_datadir}/cmake
|
||||
|
|
@ -89,6 +120,9 @@ rm locale/uranium.pot
|
|||
rm locale/*/uranium.po
|
||||
popd
|
||||
|
||||
# Bytecompile the plugins
|
||||
%py_byte_compile %{python3} %{buildroot}%{_prefix}/lib/uranium
|
||||
|
||||
%find_lang uranium
|
||||
|
||||
|
||||
|
|
@ -108,31 +142,4 @@ popd
|
|||
|
||||
|
||||
%changelog
|
||||
* Fri Oct 20 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.0.3-1
|
||||
- Update to 3.0.3 (#1504439)
|
||||
|
||||
* Wed Aug 30 2017 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-2
|
||||
- Relocate Japanese locale to ja
|
||||
|
||||
* Wed Aug 30 2017 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-1
|
||||
- Update to 2.7.0 (#1486741)
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Wed Jun 28 2017 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-2
|
||||
- Fix the test_uniqueName test failure
|
||||
|
||||
* Wed Jun 28 2017 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-1
|
||||
- Update to 2.6.1
|
||||
- Skip test_uniqueName test (reported)
|
||||
|
||||
* Tue Jun 27 2017 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-1
|
||||
- Update to 2.6.0
|
||||
|
||||
* Wed May 03 2017 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-2
|
||||
- Actually include the cmake files (needed for cura)
|
||||
|
||||
* Wed Apr 26 2017 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-1
|
||||
- Initial package
|
||||
|
||||
%autochangelog
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (Uranium-3.0.3.tar.gz) = 6afc6f186b1ead6d71c9616abad487ac4d5894aa8ebd4b642680186eaac0ad5cce5aa3491b73c3f565acb2ec3faf2afc1d58ed096b2077d6094278b1d0ab0060
|
||||
SHA512 (Uranium-5.6.0.tar.gz) = 575beb75cd73d50f85ff14fc5e5d90883f45ffc5c400dd1dcf2936e37780ab961c70da312c0a7cd856ee9c9cb8b3c4f8299488a8449e698c1c65354e7df14f19
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue