]> git.pld-linux.org Git - packages/python3-Uranium.git/blob - python3-Uranium.spec
8c1cc739d086638ea3d07cbfb5774e84e4afa628
[packages/python3-Uranium.git] / python3-Uranium.spec
1 %define         module          Uranium
2 Summary:        A Python framework for building desktop applications
3 Name:           python3-%{module}
4 Version:        2.5.0
5 Release:        2
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
10 # Source0-md5:  28586f24c35d99e5730692defd728b3e
11 Patch0:         plugins-path.patch
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
20 BuildRequires:  sip-PyQt5
21 Requires:       python3-Arcus = %{version}
22 Requires:       python3-PyQt5
23 Requires:       python3-numpy
24 Requires:       python3-scipy
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Uranium is a Python framework for building 3D printing related
30 applications.
31
32 %package doc
33 Summary:        Documentation for %{name} package
34 Group:          Documentation
35
36 %description doc
37 Documentation for Uranium, a Python framework for building 3D printing
38 related applications.
39
40 %prep
41 %setup -q -n %{module}-%{version}
42 %patch0 -p1
43
44 # Upstream installs to lib/python3/dist-packages
45 # We want to install to %%{py3_sitescriptdir}
46 sed -i 's|lib/python${PYTHON_VERSION_MAJOR}/dist-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt
47
48 # Invalid locale name ptbr
49 # https://github.com/Ultimaker/Uranium/issues/246
50 mv resources/i18n/{ptbr,pt_BR}
51 sed -i 's/"Language: ptbr\n"/"Language: pt_BR\n"/' resources/i18n/pt_BR/*.po
52
53 # empty file. appending to the end to make sure we are not overriding
54 # a non empty file in the future
55 echo '# empty' >> UM/Settings/ContainerRegistryInterface.py
56
57 # The failing test is reported at https://github.com/Ultimaker/Uranium/issues/225
58 %{__rm} -r tests/MimeTypes
59
60 %build
61 mkdir build
62 cd build
63 %{cmake} ..
64 %{__make}
65 %{__make} doc
66
67 %{__make} test
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71
72 %{__make} -C build install \
73         DESTDIR=$RPM_BUILD_ROOT
74
75 # Move the cmake files
76 mv $RPM_BUILD_ROOT%{_datadir}/cmake* $RPM_BUILD_ROOT%{_datadir}/cmake
77
78 # Sanitize the location of locale files
79 mv $RPM_BUILD_ROOT%{_datadir}/{uranium/resources/i18n,locale}
80 ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/uranium/resources/i18n
81 rm $RPM_BUILD_ROOT%{_localedir}/uranium.pot
82 rm $RPM_BUILD_ROOT%{_localedir}/*/uranium.po
83
84 %find_lang uranium
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files -f uranium.lang
90 %defattr(644,root,root,755)
91 %doc README.md
92 %{py3_sitescriptdir}/UM
93 %{_datadir}/uranium
94 %{_datadir}/cmake
95
96 %files doc
97 %defattr(644,root,root,755)
98 %doc html
This page took 0.091794 seconds and 2 git commands to generate.