2017-06-26 08:35:00 +00:00
|
|
|
#
|
2017-12-09 09:40:40 +00:00
|
|
|
# spec file for package uranium
|
2017-06-26 08:35:00 +00:00
|
|
|
#
|
2022-01-28 10:58:56 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2017-06-26 08:35:00 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2018-10-17 07:05:59 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-06-26 08:35:00 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2021-04-28 23:48:28 +00:00
|
|
|
%define UM_1_minor 6
|
|
|
|
|
|
2017-06-26 08:35:00 +00:00
|
|
|
Name: uranium
|
2022-02-09 10:25:09 +00:00
|
|
|
%define sversion 4.13.1
|
|
|
|
|
Version: 4.13.1
|
2017-06-26 08:35:00 +00:00
|
|
|
Release: 0
|
2017-12-09 09:40:40 +00:00
|
|
|
Summary: Python framework for Desktop applications
|
2018-10-17 07:05:59 +00:00
|
|
|
License: LGPL-3.0-only
|
2018-07-27 08:22:31 +00:00
|
|
|
Group: Development/Languages/Python
|
2020-11-11 08:01:39 +00:00
|
|
|
URL: https://github.com/Ultimaker/Uranium
|
|
|
|
|
Source0: https://github.com/Ultimaker/Uranium/archive/%{sversion}.tar.gz#/%{name}-%{version}.tar.gz
|
2019-06-14 06:41:30 +00:00
|
|
|
# X-OPENSUSE-FIX fix cmake install directory.
|
|
|
|
|
Patch1: fix-cmake-install.patch
|
2017-06-26 08:35:00 +00:00
|
|
|
BuildRequires: cmake
|
2020-11-22 15:29:17 +00:00
|
|
|
#BuildRequires: gcc-c++
|
2019-06-14 06:41:30 +00:00
|
|
|
# for tests:
|
2020-11-22 15:29:17 +00:00
|
|
|
BuildRequires: python3-Arcus >= %{version}
|
2020-06-07 18:42:15 +00:00
|
|
|
BuildRequires: python3-Twisted
|
|
|
|
|
BuildRequires: python3-cryptography
|
2019-06-14 06:41:30 +00:00
|
|
|
BuildRequires: python3-numpy
|
|
|
|
|
BuildRequires: python3-pip
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python3-qt5
|
|
|
|
|
BuildRequires: python3-scipy
|
|
|
|
|
BuildRequires: python3-shapely
|
2020-11-22 15:29:17 +00:00
|
|
|
# END for tests
|
2022-07-04 23:55:31 +00:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
|
# Automatic provides are not generated in Leap 15.x
|
|
|
|
|
Requires: %{python3_dist arcus}
|
|
|
|
|
Requires: %{python3_dist cryptography}
|
|
|
|
|
Requires: %{python3_dist shapely}
|
|
|
|
|
%else
|
2020-11-22 15:29:17 +00:00
|
|
|
Requires: python3-Arcus
|
2020-06-07 18:42:15 +00:00
|
|
|
Requires: python3-cryptography
|
2022-07-04 23:55:31 +00:00
|
|
|
Requires: python3-Shapely
|
|
|
|
|
%endif
|
2019-06-14 06:41:30 +00:00
|
|
|
Recommends: python3-numpy-stl
|
2020-06-07 18:42:15 +00:00
|
|
|
BuildArch: noarch
|
2019-06-26 06:40:27 +00:00
|
|
|
# No 32bit support in cura-engine anymore
|
|
|
|
|
ExcludeArch: %ix86 %arm
|
2021-01-21 08:58:50 +00:00
|
|
|
# Registered in UM/Qt/Bindings/Bindings.py
|
2021-04-28 23:48:28 +00:00
|
|
|
Provides: qt5qmlimport(UM.1) = %{UM_1_minor}
|
2017-06-26 08:35:00 +00:00
|
|
|
|
|
|
|
|
%description
|
2017-12-09 09:40:40 +00:00
|
|
|
A Python framework for building Desktop applications.
|
2017-06-26 08:35:00 +00:00
|
|
|
|
|
|
|
|
%prep
|
2024-02-22 11:27:57 +00:00
|
|
|
%autosetup -p1 -n Uranium-%sversion
|
2017-06-26 08:35:00 +00:00
|
|
|
|
2021-04-28 23:48:28 +00:00
|
|
|
# Sanity check
|
|
|
|
|
UM_1_LARGEST_MINOR=$(\
|
|
|
|
|
sed -e '/qmlRegister\(Singleton\)\?Type/ { s/.*"UM",.*1, *\([0-9]\+\).*/\1/ p } ; d' \
|
|
|
|
|
UM/Qt/Bindings/Bindings.py | sort -g -u | tail -n 1 )
|
|
|
|
|
test "${UM_1_LARGEST_MINOR}" -eq "%{UM_1_minor}" || exit 1
|
|
|
|
|
|
2017-06-26 08:35:00 +00:00
|
|
|
%build
|
2018-01-28 18:41:16 +00:00
|
|
|
# Hack, remove LIB_SUFFIX for 64bit, which is correct as uranium is pure python (i.e. noarch)
|
2019-06-14 06:41:30 +00:00
|
|
|
%cmake -DLIB_SUFFIX="" \
|
|
|
|
|
-DCMAKE_MODULES_INSTALL_DIR=%{_datadir}/cmake/Modules
|
|
|
|
|
%cmake_build
|
2017-06-26 08:35:00 +00:00
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
pushd build
|
|
|
|
|
%make_install
|
|
|
|
|
# uranium uses i18n instead of locale for the path to translation files,
|
|
|
|
|
# thus we cannot use %%find_lang
|
|
|
|
|
popd
|
|
|
|
|
find %{buildroot}%{_datadir}/%{name} -name %{name}.po* -delete
|
|
|
|
|
echo '%defattr(644,root,root,755)' > %{name}.lang
|
|
|
|
|
find %{buildroot}%{_datadir}/%{name} -name %{name}.mo | sed '
|
|
|
|
|
s:'%{buildroot}'::; s:\(.*/i18n/\)\([^/]\+\)\(.*mo\):%lang(\2) \1\2\3:' \
|
|
|
|
|
>> %{name}.lang
|
|
|
|
|
find %{buildroot}%{_datadir}/%{name} -type d -path \*i18n\* | sed '
|
|
|
|
|
s:'%{buildroot}'::; s:\(.*/i18n.*\):%dir \1:' \
|
|
|
|
|
>> %{name}.lang
|
2019-06-14 06:41:30 +00:00
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%{__python3} -m pip freeze
|
2020-06-07 18:42:15 +00:00
|
|
|
# TestHttpRequestManager has threading issues, see https://github.com/Ultimaker/Uranium/issues/594
|
2020-09-28 21:26:46 +00:00
|
|
|
%{__python3} -m pytest -v -k 'not TestHttpRequestManager.py'
|
2017-06-26 08:35:00 +00:00
|
|
|
|
|
|
|
|
%files -f %{name}.lang
|
2018-07-16 06:26:53 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc docs README.md
|
2018-01-28 18:41:16 +00:00
|
|
|
%{_prefix}/lib/uranium
|
|
|
|
|
%{python3_sitelib}/UM
|
2018-10-17 07:10:16 +00:00
|
|
|
%{_datadir}/uranium
|
2017-12-09 09:40:40 +00:00
|
|
|
%{_datadir}/cmake/Modules/UraniumTranslationTools.cmake
|
2017-06-26 08:35:00 +00:00
|
|
|
|
2017-12-09 09:40:40 +00:00
|
|
|
%changelog
|