]>
Commit | Line | Data |
---|---|---|
44f39427 JR |
1 | %define module Uranium |
2 | Summary: A Python framework for building desktop applications | |
3 | Name: python3-%{module} | |
0166922d JR |
4 | Version: 3.5.1 |
5 | Release: 1 | |
44f39427 JR |
6 | License: AGPLv3+ |
7 | Group: Libraries/Python | |
8 | URL: https://github.com/Ultimaker/Uranium | |
9 | Source0: https://github.com/Ultimaker/Uranium/archive/%{version}/%{module}-%{version}.tar.gz | |
0166922d JR |
10 | # Source0-md5: c67cc1f04d5a78595eefa55a02629c47 |
11 | Patch0: remove-mypy-test.patch | |
44f39427 JR |
12 | BuildRequires: cmake |
13 | BuildRequires: doxygen | |
14 | BuildRequires: gettext-tools | |
15 | BuildRequires: python3-Arcus = %{version} | |
16 | BuildRequires: python3-devel | |
17 | BuildRequires: python3-numpy | |
18 | BuildRequires: python3-pytest | |
19 | BuildRequires: python3-scipy | |
0166922d | 20 | BuildRequires: python3-shapely |
44f39427 JR |
21 | BuildRequires: sip-PyQt5 |
22 | Requires: python3-Arcus = %{version} | |
23 | Requires: python3-PyQt5 | |
24 | Requires: python3-numpy | |
25 | Requires: python3-scipy | |
0166922d | 26 | Requires: python3-shapely |
3427ea0f | 27 | Obsoletes: python3-UM |
44f39427 JR |
28 | BuildArch: noarch |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | Uranium is a Python framework for building 3D printing related | |
33 | applications. | |
34 | ||
35 | %package doc | |
36 | Summary: Documentation for %{name} package | |
37 | Group: Documentation | |
38 | ||
39 | %description doc | |
40 | Documentation for Uranium, a Python framework for building 3D printing | |
41 | related applications. | |
42 | ||
43 | %prep | |
44 | %setup -q -n %{module}-%{version} | |
45 | %patch0 -p1 | |
46 | ||
0166922d JR |
47 | for bad_lang in de_DE es_ES fi_FI fr_FR hu_HU it_IT ja_JP ko_KR nl_NL pl_PL pt_PT ru_RU tr_TR ; do |
48 | lang="$(echo $bad_lang | sed 's/_.*//')" | |
49 | %{__mv} "resources/i18n/$bad_lang" "resources/i18n/$lang" | |
50 | done | |
51 | ||
44f39427 JR |
52 | # Upstream installs to lib/python3/dist-packages |
53 | # We want to install to %%{py3_sitescriptdir} | |
0166922d | 54 | sed -i 's|lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.*/.*-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt |
44f39427 JR |
55 | |
56 | # empty file. appending to the end to make sure we are not overriding | |
57 | # a non empty file in the future | |
58 | echo '# empty' >> UM/Settings/ContainerRegistryInterface.py | |
59 | ||
60 | # The failing test is reported at https://github.com/Ultimaker/Uranium/issues/225 | |
61 | %{__rm} -r tests/MimeTypes | |
62 | ||
63 | %build | |
64 | mkdir build | |
65 | cd build | |
66 | %{cmake} .. | |
67 | %{__make} | |
68 | %{__make} doc | |
69 | ||
70 | %{__make} test | |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %{__make} -C build install \ | |
76 | DESTDIR=$RPM_BUILD_ROOT | |
77 | ||
78 | # Move the cmake files | |
79 | mv $RPM_BUILD_ROOT%{_datadir}/cmake* $RPM_BUILD_ROOT%{_datadir}/cmake | |
80 | ||
81 | # Sanitize the location of locale files | |
82 | mv $RPM_BUILD_ROOT%{_datadir}/{uranium/resources/i18n,locale} | |
83 | ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/uranium/resources/i18n | |
84 | rm $RPM_BUILD_ROOT%{_localedir}/uranium.pot | |
85 | rm $RPM_BUILD_ROOT%{_localedir}/*/uranium.po | |
86 | ||
87 | %find_lang uranium | |
88 | ||
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %files -f uranium.lang | |
93 | %defattr(644,root,root,755) | |
94 | %doc README.md | |
95 | %{py3_sitescriptdir}/UM | |
0166922d | 96 | %{_libdir}/uranium |
44f39427 JR |
97 | %{_datadir}/uranium |
98 | %{_datadir}/cmake | |
99 | ||
100 | %files doc | |
101 | %defattr(644,root,root,755) | |
102 | %doc html |