3 %bcond_with tests # do not perform "make test"
6 Summary: A Python framework for building desktop applications
7 Name: python3-%{module}
11 Group: Libraries/Python
12 URL: https://github.com/Ultimaker/Uranium
13 Source0: https://github.com/Ultimaker/Uranium/archive/%{version}/%{module}-%{version}.tar.gz
14 # Source0-md5: ebfbcb5d98fbf4056aa00a72051499c6
15 Patch0: remove-mypy-test.patch
16 Patch1: plugins-path.patch
18 BuildRequires: doxygen
19 BuildRequires: gettext-tools
20 BuildRequires: python3-Arcus = %{version}
21 BuildRequires: python3-devel
22 BuildRequires: python3-numpy
23 BuildRequires: python3-pytest
24 BuildRequires: python3-scipy
25 BuildRequires: python3-shapely
26 BuildRequires: sip-PyQt5
27 Requires: python3-Arcus = %{version}
28 Requires: python3-PyQt5
29 Requires: python3-numpy
30 Requires: python3-scipy
31 Requires: python3-shapely
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 Uranium is a Python framework for building 3D printing related
41 Summary: Documentation for %{name} package
45 Documentation for Uranium, a Python framework for building 3D printing
49 %setup -q -n %{module}-%{version}
53 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
54 lang="$(echo $bad_lang | sed 's/_.*//')"
55 %{__mv} "resources/i18n/$bad_lang" "resources/i18n/$lang"
58 # Upstream installs to lib/python3/dist-packages
59 # We want to install to %%{py3_sitescriptdir}
60 sed -i 's|lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.*/.*-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt
62 # empty file. appending to the end to make sure we are not overriding
63 # a non empty file in the future
64 echo '# empty' >> UM/Settings/ContainerRegistryInterface.py
66 # The failing test is reported at https://github.com/Ultimaker/Uranium/issues/225
67 %{__rm} -r tests/MimeTypes
76 %{?with_tests:%{__make} test}
79 rm -rf $RPM_BUILD_ROOT
81 %{__make} -C build install \
82 DESTDIR=$RPM_BUILD_ROOT
84 # Move the cmake files
85 mv $RPM_BUILD_ROOT%{_datadir}/cmake* $RPM_BUILD_ROOT%{_datadir}/cmake
87 # Sanitize the location of locale files
88 mv $RPM_BUILD_ROOT%{_datadir}/{uranium/resources/i18n,locale}
89 ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/uranium/resources/i18n
90 rm $RPM_BUILD_ROOT%{_localedir}/uranium.pot
91 rm $RPM_BUILD_ROOT%{_localedir}/*/uranium.po
96 rm -rf $RPM_BUILD_ROOT
98 %files -f uranium.lang
99 %defattr(644,root,root,755)
101 %{py3_sitescriptdir}/UM
106 %defattr(644,root,root,755)