2018-05-08 11:36:29 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-pymol
|
|
|
|
|
#
|
2024-06-26 10:01:51 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-05-08 11:36:29 +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.
|
|
|
|
|
|
2019-01-05 13:42:32 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-08 11:36:29 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2024-06-26 10:01:51 +00:00
|
|
|
%bcond_with test
|
2018-05-08 11:36:29 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2023-08-12 13:59:29 +00:00
|
|
|
%define skip_python2 1
|
2018-05-08 11:36:29 +00:00
|
|
|
%define oldpython python
|
2019-01-05 13:42:32 +00:00
|
|
|
%define modname pymol-open-source
|
2018-05-08 11:36:29 +00:00
|
|
|
Name: python-pymol
|
2024-06-26 10:01:51 +00:00
|
|
|
Version: 3.0.0
|
2018-05-08 11:36:29 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: A Molecular Viewer
|
|
|
|
|
License: Python-2.0
|
|
|
|
|
Group: Productivity/Scientific/Chemistry
|
2024-06-26 10:01:51 +00:00
|
|
|
URL: https://pymol.org/
|
2021-02-22 16:56:51 +00:00
|
|
|
Source0: https://github.com/schrodinger/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz
|
2018-05-08 11:36:29 +00:00
|
|
|
# PATCH-FIX-OPENSUSE no-build-date.patch dhall@wustl.edu -- patch eliminates build date
|
|
|
|
|
Patch0: no-build-date.patch
|
|
|
|
|
# PATCH-FIX-OPENSUSE no-o3.patch tchvatal@suse.com -- do not add O3 to the code
|
|
|
|
|
Patch1: no-o3.patch
|
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
|
BuildRequires: %{python_module numpy-devel}
|
|
|
|
|
BuildRequires: %{python_module qt5-devel}
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: freetype2-devel
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: glew-devel
|
2018-08-31 08:42:08 +00:00
|
|
|
BuildRequires: glm-devel
|
2023-08-12 13:59:29 +00:00
|
|
|
BuildRequires: msgpack-cxx-devel
|
2018-05-08 11:36:29 +00:00
|
|
|
BuildRequires: libpng-devel
|
|
|
|
|
BuildRequires: libxml2-devel
|
2021-02-22 16:56:51 +00:00
|
|
|
BuildRequires: mmtf-cpp-devel
|
|
|
|
|
BuildRequires: netcdf-devel
|
2018-05-08 11:36:29 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2024-06-26 10:01:51 +00:00
|
|
|
%if %{with test}
|
|
|
|
|
BuildRequires: Catch2-2-devel
|
|
|
|
|
BuildRequires: %{python_module Pillow}
|
|
|
|
|
## tests need recent biopython not available in Leap
|
|
|
|
|
%if 0%{?sle_version} >= 150500 && 0%{?is_opensuse}
|
|
|
|
|
%else
|
|
|
|
|
BuildRequires: %{python_module biopython}
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
%endif
|
2018-05-08 11:36:29 +00:00
|
|
|
Requires: python-numpy
|
|
|
|
|
Requires: python-qt5
|
2023-08-12 13:59:29 +00:00
|
|
|
Requires: python-pmw
|
2018-05-08 11:36:29 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-05-19 04:31:55 +00:00
|
|
|
Requires(postun):update-alternatives
|
2018-05-08 11:36:29 +00:00
|
|
|
Obsoletes: pymol < %{version}
|
|
|
|
|
Provides: pymol = %{version}
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
PyMOL is a molecular graphics system targetted at medium to large
|
2018-06-22 11:30:01 +00:00
|
|
|
biomolecules like proteins. It can generate molecular graphics
|
|
|
|
|
images and animations.
|
2018-05-08 11:36:29 +00:00
|
|
|
|
|
|
|
|
Features include:
|
|
|
|
|
|
|
|
|
|
* Visualization of molecules, molecular trajectories and surfaces
|
|
|
|
|
of crystallography data or orbitals
|
|
|
|
|
* Molecular builder and sculptor
|
|
|
|
|
* Internal raytracer and movie generator
|
|
|
|
|
* Fully extensible and scriptable via a python interface
|
|
|
|
|
|
2018-06-22 11:30:01 +00:00
|
|
|
The file formats PyMOL can read include PDB, XYZ, CIF, MDL Molfile,
|
2018-05-08 11:36:29 +00:00
|
|
|
ChemDraw, CCP4 maps, XPLOR maps and Gaussian cube maps.
|
|
|
|
|
|
|
|
|
|
%prep
|
2019-01-05 13:42:32 +00:00
|
|
|
%setup -q -n %{modname}-%{version}
|
|
|
|
|
%autopatch -p1
|
2024-06-26 10:01:51 +00:00
|
|
|
|
2018-05-08 11:36:29 +00:00
|
|
|
%build
|
|
|
|
|
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
|
2024-06-26 10:01:51 +00:00
|
|
|
%python_build %{?with_test:--testing}
|
2018-05-08 11:36:29 +00:00
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_install
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pymol
|
2018-08-31 08:42:08 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2018-05-08 11:36:29 +00:00
|
|
|
|
2024-06-26 10:01:51 +00:00
|
|
|
%check
|
|
|
|
|
%if %{with test}
|
|
|
|
|
## TestExporting.testglTF requires a special executable from Schrodinger
|
|
|
|
|
sed -e '/def testglTF(self):/,+7d' -i testing/tests/api/exporting.py
|
|
|
|
|
%if 0%{?sle_version} >= 150500 && 0%{?is_opensuse}
|
|
|
|
|
## TestSeqalign needs recent biopython not available in Leap
|
|
|
|
|
rm testing/tests/api/seqalign.py
|
|
|
|
|
## fails on Leap, but freemol is unused anyway
|
|
|
|
|
rm testing/tests/system/freemol_.py
|
|
|
|
|
## default pytest / python on leap are too old...
|
|
|
|
|
sed -e '/--import-mode=importlib/d' -i testing/pytest.ini
|
|
|
|
|
%endif
|
|
|
|
|
## pymol -ckqy testing/testing.py --run all
|
|
|
|
|
PYTHONPATH=%{buildroot}%{python_sitearch} python%{python_version} -m pymol -ckqy testing/testing.py --offline --run all
|
|
|
|
|
%endif
|
|
|
|
|
|
2018-05-08 11:36:29 +00:00
|
|
|
%post
|
|
|
|
|
%python_install_alternative pymol
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative pymol
|
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
2018-08-31 08:42:08 +00:00
|
|
|
%doc README ChangeLog
|
|
|
|
|
%license LICENSE
|
2018-05-08 11:36:29 +00:00
|
|
|
%python_alternative %{_bindir}/pymol
|
|
|
|
|
%{python_sitearch}*
|
|
|
|
|
|
|
|
|
|
%changelog
|