pymol: 3.0.0 -> 3.1.0, fix msgpack on non-Darwin

This commit is contained in:
samlich
2025-02-16 22:12:24 +01:00
parent 18c9983952
commit f03da2128b
3 changed files with 73 additions and 33 deletions
@@ -3,6 +3,7 @@
lib,
fetchFromGitHub,
makeDesktopItem,
cmake,
python3Packages,
netcdf,
glew,
@@ -10,6 +11,7 @@
libpng,
libxml2,
freetype,
mmtf-cpp,
msgpack,
qt5,
}:
@@ -43,37 +45,51 @@ let
in
python3Packages.buildPythonApplication rec {
inherit pname;
version = "3.0.0";
version = "3.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "schrodinger";
repo = "pymol-open-source";
rev = "v${version}";
hash = "sha256-GhTHxacjGN7XklZ6gileBMRZAGq4Pp4JknNL+qGqrVE=";
hash = "sha256-2C9kUpNfK9g7ehmk83iUVqqz4gn4wKO3lW5rSduFP6U=";
};
# A script is already created by the `[project.scripts]` directive
# in `pyproject.toml`.
patches = [ ./script-already-exists.patch ];
postPatch = ''
substituteInPlace setup.py \
--replace-fail "self.install_libbase" '"${placeholder "out"}/${python3Packages.python.sitePackages}"'
'';
build-system = [
python3Packages.setuptools
env.PREFIX_PATH = lib.optionalString (!stdenv.hostPlatform.isDarwin) "${msgpack}";
build-system = [ python3Packages.setuptools ];
dontUseCmakeConfigure = true;
nativeBuildInputs = [
cmake
qt5.wrapQtAppsHook
];
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
buildInputs = [
python3Packages.numpy
python3Packages.pyqt5
glew
glm
libpng
libxml2
freetype
msgpack
netcdf
];
buildInputs =
[
python3Packages.numpy_1
python3Packages.pyqt5
qt5.qtbase
glew
glm
libpng
libxml2
freetype
netcdf
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
mmtf-cpp
msgpack
];
env.NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2";
postInstall =
@@ -94,9 +110,7 @@ python3Packages.buildPythonApplication rec {
cp -r "${desktopItem}/share/applications/" "$out/share/"
'';
pythonImportsCheck = [
"pymol"
];
pythonImportsCheck = [ "pymol" ];
nativeCheckInputs = with python3Packages; [
python3Packages.msgpack
@@ -112,17 +126,22 @@ python3Packages.buildPythonApplication rec {
"tests/api/seqalign.py"
];
disabledTests = [
# the output image does not exactly match
"test_commands"
# touch the network
"testFetch"
# requires collada2gltf which is not included in nixpkgs
"testglTF"
# require mmtf-cpp which does not support darwin
"testMMTF"
"testSave_symmetry__mmtf"
];
disabledTests =
[
# the output image does not exactly match
"test_commands"
# touch the network
"testFetch"
# requires collada2gltf which is not included in nixpkgs
"testglTF"
]
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
# require mmtf-cpp which does not support darwin
"test_bcif"
"test_bcif_array"
"testMMTF"
"testSave_symmetry__mmtf"
];
preCheck = ''
cd testing
@@ -0,0 +1,23 @@
diff --git a/setup.py b/setup.py
index 507dd32d..bf258897 100644
--- a/setup.py
+++ b/setup.py
@@ -435,9 +435,6 @@ class install_pymol(install):
super().run()
self.install_pymol_path()
- if not self.no_launcher:
- self.make_launch_script()
-
if self.bundled_pmw:
raise Exception(
"--bundled-pmw has been removed, please install Pmw from "
@@ -487,7 +484,7 @@ class install_pymol(install):
launch_script = os.path.join(self.install_scripts, launch_script)
python_exe = os.path.abspath(sys.executable)
- site_packages_dir = sysconfig.get_path('purelib')
+ site_packages_dir = sysconfig.get_path("purelib")
pymol_file = self.unchroot(
os.path.join(site_packages_dir, "pymol", "__init__.py")
)
+1 -3
View File
@@ -16774,9 +16774,7 @@ with pkgs;
pdb2pqr = with python3Packages; toPythonApplication pdb2pqr;
pymol = callPackage ../applications/science/chemistry/pymol {
python3Packages = python311Packages;
};
pymol = callPackage ../applications/science/chemistry/pymol { };
quantum-espresso = callPackage ../applications/science/chemistry/quantum-espresso {
hdf5 = hdf5-fortran;