]> git.pld-linux.org Git - packages/python3-Uranium.git/blame - python3-Uranium.spec
- up to 3.5.1
[packages/python3-Uranium.git] / python3-Uranium.spec
CommitLineData
44f39427
JR
1%define module Uranium
2Summary: A Python framework for building desktop applications
3Name: python3-%{module}
0166922d
JR
4Version: 3.5.1
5Release: 1
44f39427
JR
6License: AGPLv3+
7Group: Libraries/Python
8URL: https://github.com/Ultimaker/Uranium
9Source0: https://github.com/Ultimaker/Uranium/archive/%{version}/%{module}-%{version}.tar.gz
0166922d
JR
10# Source0-md5: c67cc1f04d5a78595eefa55a02629c47
11Patch0: remove-mypy-test.patch
44f39427
JR
12BuildRequires: cmake
13BuildRequires: doxygen
14BuildRequires: gettext-tools
15BuildRequires: python3-Arcus = %{version}
16BuildRequires: python3-devel
17BuildRequires: python3-numpy
18BuildRequires: python3-pytest
19BuildRequires: python3-scipy
0166922d 20BuildRequires: python3-shapely
44f39427
JR
21BuildRequires: sip-PyQt5
22Requires: python3-Arcus = %{version}
23Requires: python3-PyQt5
24Requires: python3-numpy
25Requires: python3-scipy
0166922d 26Requires: python3-shapely
3427ea0f 27Obsoletes: python3-UM
44f39427
JR
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32Uranium is a Python framework for building 3D printing related
33applications.
34
35%package doc
36Summary: Documentation for %{name} package
37Group: Documentation
38
39%description doc
40Documentation for Uranium, a Python framework for building 3D printing
41related applications.
42
43%prep
44%setup -q -n %{module}-%{version}
45%patch0 -p1
46
0166922d
JR
47for 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"
50done
51
44f39427
JR
52# Upstream installs to lib/python3/dist-packages
53# We want to install to %%{py3_sitescriptdir}
0166922d 54sed -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
58echo '# 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
64mkdir build
65cd build
66%{cmake} ..
67%{__make}
68%{__make} doc
69
70%{__make} test
71
72%install
73rm -rf $RPM_BUILD_ROOT
74
75%{__make} -C build install \
76 DESTDIR=$RPM_BUILD_ROOT
77
78# Move the cmake files
79mv $RPM_BUILD_ROOT%{_datadir}/cmake* $RPM_BUILD_ROOT%{_datadir}/cmake
80
81# Sanitize the location of locale files
82mv $RPM_BUILD_ROOT%{_datadir}/{uranium/resources/i18n,locale}
83ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/uranium/resources/i18n
84rm $RPM_BUILD_ROOT%{_localedir}/uranium.pot
85rm $RPM_BUILD_ROOT%{_localedir}/*/uranium.po
86
87%find_lang uranium
88
89%clean
90rm -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
This page took 0.066741 seconds and 4 git commands to generate.