%global namespace 0 %if %{namespace} %global shortname lulzbot-uranium %else %global shortname uranium %endif Name: python-lulzbot-uranium Version: 2.6.21 Release: 1%{?dist} Summary: A Python framework for building desktop applications License: AGPLv3+ URL: https://code.alephobjects.com/diffusion/U/repository/master/ # git clone https://code.alephobjects.com/diffusion/U/uranium.git # cd uranium # git checkout v2.6.21 # git archive --format=tar.gz --prefix=lulzbot-uranium-%{version}/ v2.6.21 > ../lulzbot-uranium-%{version}.tar.gz Source0: lulzbot-uranium-%{version}.tar.gz # Cannot conflict Patch1: lulzbot-uranium-2.6.19-system.patch BuildRequires: python3-devel BuildRequires: /usr/bin/doxygen BuildRequires: /usr/bin/msgmerge BuildRequires: cmake BuildRequires: git # Tests BuildRequires: python3-arcus >= 2.6 BuildRequires: python3-numpy BuildRequires: python3-scipy BuildRequires: python3-qt5 BuildRequires: python3-pytest BuildArch: noarch # There are Python plugins in /usr/lib/uranium # We need to byte-compile it with Python 3 %global __python %{__python3} %description Uranium is a Python framework for building 3D printing related applications. %package -n python3-lulzbot-uranium Summary: %{summary} %{?python_provide:%python_provide python3-lulzbot-uranium} %if %{namespace} # do nothing %else Conflicts: python3-uranium %endif Requires: python3-arcus >= 2.6 Requires: python3-numpy Requires: python3-scipy Requires: python3-qt5 Recommends: python3-numpy-stl %description -n python3-lulzbot-uranium Uranium is a Python framework for building 3D printing related applications. %package doc Summary: Documentation for %{name} package %description doc Documentation for Uranium, a Python framework for building 3D printing related applications. %prep %setup -n lulzbot-uranium-%{version} %if %{namespace} %patch1 -p1 -b .system %endif # Upstream installs to lib/python3/dist-packages # We want to install to %%{python3_sitelib} sed -i 's|lib/python${PYTHON_VERSION_MAJOR}/dist-packages|%(echo %{python3_sitelib} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt # Invalid locale name ptbr # https://github.com/Ultimaker/Uranium/issues/246 mv resources/i18n/{ptbr,pt_BR} sed -i 's/"Language: ptbr\n"/"Language: pt_BR\n"/' resources/i18n/pt_BR/*.po # empty file. appending to the end to make sure we are not overriding # a non empty file in the future echo '# empty' >> UM/Settings/ContainerRegistryInterface.py %if %{namespace} # lulzbot namespacing find -name \*.qml -exec sed -i \ -e 's|import UM|import CuraLulzbot.UM|g' \ -e 's|UM\.|CuraLulzbot.UM\.|g' {} \; find -name \*.py -exec sed -i \ -e 's/from UM import/from CuraLulzbot.UM import/g' \ -e 's/from UM\./from CuraLulzbot.UM./g' \ -e 's|\@UM\.|\@CuraLulzbot.UM\.|g' \ -e 's/import UM 1/import CuraLulzbot.UM 1/g' \ -e 's|UM.VersionUpgradeManager.VersionUpgradeManager.getInstance|CuraLulzbot.UM.VersionUpgradeManager.VersionUpgradeManager.getInstance|g' \ -e 's|UM.Resources.Resources.|CuraLulzbot.UM.Resources.Resources.|g' \ -e 's| - 2.6.21-1 - update to 2.6.21 * Thu Jul 27 2017 Tom Callaway - 2.6.19-1 - make lulzbot specific package * Wed Jun 28 2017 Miro Hrončok - 2.6.1-2 - Fix the test_uniqueName test failure * Wed Jun 28 2017 Miro Hrončok - 2.6.1-1 - Update to 2.6.1 - Skip test_uniqueName test (reported) * Tue Jun 27 2017 Miro Hrončok - 2.6.0-1 - Update to 2.6.0 * Wed May 03 2017 Miro Hrončok - 2.5.0-2 - Actually include the cmake files (needed for cura) * Wed Apr 26 2017 Miro Hrončok - 2.5.0-1 - Initial package