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