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