forked from altlinux/specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUranium.spec
203 lines (153 loc) · 5.68 KB
/
Uranium.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# Unpackaged files in buildroot should terminate build
%define _unpackaged_files_terminate_build 1
%global with_check 1
%add_python3_compile_include %_libexecdir/uranium
Name: Uranium
Version: 5.4.0
Release: alt3
Summary: A Python framework for building Desktop applications.
License: LGPL-3.0
Group: Development/Python3
URL: https://github.com/Ultimaker/Uranium
BuildRequires(pre): rpm-macros-python3 rpm-macros-cmake
BuildRequires: rpm-build-python3
BuildRequires: python3-devel cmake
BuildRequires: %_bindir/doxygen
BuildRequires: %_bindir/msgmerge
# Tests
%if 0%{?with_check}
BuildRequires: python3-module-Arcus
BuildRequires: python3-module-numpy
BuildRequires: python3-module-numpy-testing
BuildRequires: python3-module-scipy
BuildRequires: python3-module-PyQt6
BuildRequires: python3-module-pytest
BuildRequires: python3-module-pip
BuildRequires: python3-module-shapely
BuildRequires: python3-module-twisted-web
BuildRequires: python3-modules-sqlite3
BuildRequires: python3-module-pyclipper
%endif
BuildArch: noarch
# Source-url: https://github.com/Ultimaker/%name/archive/refs/tags/%version.tar.gz
Source: %name-%version.tar
# 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
Patch: Uranium-4.7.1-set-default-languages.patch
# from Fedora
Patch2: Uranium-5.3.0-qt-try-ints-then-bytes-for-gl-mask-functions.patch
# Fix asserts for called once in Python 3.12
# https://github.com/Ultimaker/Uranium/pull/885.patch#/Uranium-5.3.0-python3.12.patch
Patch3: Uranium-5.3.0-python3.12.patch
%description
%summary
%package doc
Summary: Documentation for %name package
Group: Documentation
%description doc
Documentation for Uranium, a Python framework for building 3D printing
related applications.
%prep
%setup
mkdir cmake
cp -a %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE5 cmake/
rm CMakeLists.txt
cp -a %SOURCE6 %SOURCE7 %SOURCE8 .
# fix compile-shaders
sed -i 's|qsb |qsb-qt6 |g' scripts/compile-shaders
%autopatch -p1
%build
# 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
%install
%cmake_install
mv %buildroot/%_datadir/cmake* %buildroot/%_datadir/cmake
# Sanitize the location of locale files
pushd %buildroot%_datadir
mv uranium/resources/i18n locale
ln -s ../../locale uranium/resources/i18n
rm locale/uranium.pot
rm locale/*/uranium.po
popd
%find_lang uranium
%check
%if 0%{?with_check}
pip3 freeze
# 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 and not test_isValid \
and not test_properties and not test_triggerAction \
and not test_triggerActionWithData and not test_activeToolPanel"
%endif
%files -f uranium.lang
%doc LICENSE README.md
%python3_sitelibdir/*
%_libexecdir/uranium
%_datadir/uranium
%_datadir/cmake/Modules/*
%files doc
%doc html LICENSE
%changelog
* Mon Feb 26 2024 Anton Midyukov <[email protected]> 5.4.0-alt3
- Disable failed tests
* Sun Jan 28 2024 Anton Midyukov <[email protected]> 5.4.0-alt2
- Fix build with python 3.12
* Mon Dec 18 2023 Anton Midyukov <[email protected]> 5.4.0-alt1
- new version (5.4.0) with rpmgs script
* Mon Nov 27 2023 Anton Midyukov <[email protected]> 5.3.1-alt2
- Add patches for qt6.6 support
* Tue Apr 25 2023 Anton Midyukov <[email protected]> 5.3.1-alt1
- new version (5.3.1) with rpmgs script
* Wed Jan 26 2022 Anton Midyukov <[email protected]> 4.13.0-alt1
- new version (4.13.0) with rpmgs script
* Mon Dec 13 2021 Anton Midyukov <[email protected]> 4.12.1-alt1
- new version (4.12.1) with rpmgs script
* Sat Sep 11 2021 Anton Midyukov <[email protected]> 4.11.0-alt1
- new version (4.11.0) with rpmgs script
* Mon May 31 2021 Arseny Maslennikov <[email protected]> 4.8-alt2.1
- NMU: spec: adapted to new cmake macros.
* Tue Apr 20 2021 Anton Midyukov <[email protected]> 4.8-alt2
- merge with p9
* Thu Apr 15 2021 Anton Midyukov <[email protected]> 4.7.1-alt1.p9
- Fix setup default language
* Sun Nov 15 2020 Anton Midyukov <[email protected]> 4.8-alt1
- New version 4.8
* Thu Nov 12 2020 Anton Midyukov <[email protected]> 4.7.1-alt2
- Fix buildrequires
* Thu Sep 17 2020 Anton Midyukov <[email protected]> 4.7.1-alt1
- New version 4.7.1
* Thu May 07 2020 Anton Midyukov <[email protected]> 4.6.1-alt1
- New version 4.6.1
* Sat Jan 25 2020 Anton Midyukov <[email protected]> 4.4.1-alt1
- New version 4.4.1
* Thu Oct 03 2019 Stanislav Levin <[email protected]> 3.6.0-alt4
- Fixed testing.
* Sun Jun 23 2019 Igor Vlasenko <[email protected]> 3.6.0-alt3
- NMU: remove rpm-build-ubt from BR:
* Tue Jun 04 2019 Stanislav Levin <[email protected]> 3.6.0-alt2
- Fixed Pytest4.x compatibility errors.
* Fri Feb 01 2019 Anton Midyukov <[email protected]> 3.6.0-alt1
- New version 3.6.0
* Wed Jan 30 2019 Anton Midyukov <[email protected]> 3.4.1-alt1.1
- Fix BuildRequires
* Mon Sep 03 2018 Anton Midyukov <[email protected]> 3.4.1-alt1
- New version 3.4.1
* Sun May 06 2018 Anton Midyukov <[email protected]> 3.3.0-alt1.S1
- New version 3.3.0
* Fri Feb 23 2018 Anton Midyukov <[email protected]> 3.2.1-alt1.S1
- New version 3.2.1
* Sun Dec 31 2017 Anton Midyukov <[email protected]> 3.0.3-alt1
- New version 3.0.3
* Wed Nov 22 2017 Anton Midyukov <[email protected]> 2.4.0-alt1
- Initial build for Sisyphus