From 690e2fb5605382b6685ba0cad8e0827069f1c825 Mon Sep 17 00:00:00 2001 From: Alex Mestiashvili Date: Tue, 28 Oct 2025 18:01:46 +0100 Subject: [PATCH 1/4] Drop "broken" openbabel dependency from pyproject.toml setup.py suppose to take care of openbabel bindings --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a910db7..cd5e897 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,6 @@ classifiers = [ dependencies = [ "numpy>=1.13.3", "lxml>=4.2.1", - "openbabel>=3.1.1", ] [project.urls] From fc804affedbc13054f3d440eff4eb8f17a6db8ae Mon Sep 17 00:00:00 2001 From: sysadm Date: Fri, 3 Jul 2026 16:23:45 +0200 Subject: [PATCH 2/4] Remove setup.{py,cfg}, update pyproject.toml Add dependency on fixed openbabel 3.2.0 No need in workarounds to build openbabel python bindings as with version 3.1.1.1 --- pyproject.toml | 4 +- setup.cfg | 2 - setup.py | 101 ------------------------------------------------- 3 files changed, 3 insertions(+), 104 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml index cd5e897..6f21926 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] build-backend = "setuptools.build_meta" -requires = ["setuptools","pip","requests"] +requires = ["setuptools"] [project] name = "plip" @@ -31,12 +31,14 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Bio-Informatics" ] dependencies = [ "numpy>=1.13.3", "lxml>=4.2.1", + "openbabel>=3.2.0", ] [project.urls] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 224a779..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -description-file = README.md \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index d5cbdec..0000000 --- a/setup.py +++ /dev/null @@ -1,101 +0,0 @@ -from setuptools import setup, find_packages -from setuptools.command.build_ext import build_ext -from setuptools.command.install import install -from distutils.command.build import build - -def install_pkg_via_pip(package): - import sys - import subprocess - subprocess.check_call([sys.executable, '-m', 'pip', 'install', package]) - -def build_ob_py_bindings(): - """ Fix openbabel issue (https://github.com/openbabel/openbabel/issues/2408) manually - - Download openbabel bindings from pypi - - extract to a tmpdir - - fix version in $tmpdir/openbabel-3.1.1.1/openbabel/__init__.py to have 2 dot version only - - install the fixed version with setuptools/pip - - cleanup the tmpdir - """ - import requests - import tarfile - import tempfile - import shutil - import fileinput - import subprocess - import sys - - openbabel_pypi_url='https://files.pythonhosted.org/packages/9d/3f/f08f5d1422d74ed0e1e612870b343bfcc26313bdf9efec9165c3ea4b3ae2/openbabel-3.1.1.1.tar.gz' - - print (f"Downloading openbabel package from : {openbabel_pypi_url}") - obtar=requests.get(openbabel_pypi_url) - obtmpdir = tempfile.mkdtemp() - obtmp = obtmpdir+'/openbabel-3.1.1.1.tar' - open(obtmp,'wb').write(obtar.content) - print(f"Saving openbabel tar.gz to {obtmpdir}") - versfile = obtmpdir+'/openbabel-3.1.1.1/openbabel/__init__.py' - - with tarfile.open(obtmp,mode='r') as tf: - tf.extractall(obtmpdir) - - print ('Fix versions: s/3.1.1.1/3.1.1/ to make StrictVersion() in openbabel\'s setup.py happy') - print ('See https://github.com/openbabel/openbabel/issues/2408 for more details') - with fileinput.input(files=versfile,inplace=True) as f: - for line in f: - op = line.replace('__version__ = "3.1.1.1"', '__version__ = "3.1.1"') - print(op, end='') - - install_pkg_via_pip(obtmpdir+'/openbabel-3.1.1.1/') - print (f"Cleanup tmpdir: {obtmpdir}") - shutil.rmtree(obtmpdir) - -class CustomBuild(build): - """Ensure build_ext runs first in build command.""" - def run(self): - self.run_command('build_ext') - build.run(self) - -class CustomInstall(install): - """Ensure build_ext runs first in install command.""" - def run(self): - self.run_command('build_ext') - install.run(self) - -class CustomBuildExt(build_ext): - """ Check if openbabel bindings are installed || build them """ - def run(self): - try: import openbabel - except ModuleNotFoundError: - try: import requests - except ModuleNotFoundError: - install_pkg_via_pip('requests') - build_ob_py_bindings() - return - -setup(name='plip', - version='3.0.0', - description='PLIP - Fully automated protein-ligand interaction profiler', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Science/Research', - 'Natural Language :: English', - 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', - 'Programming Language :: Python :: 3.6', - 'Topic :: Scientific/Engineering :: Bio-Informatics' - ], - url='https://github.com/pharmai/plip', - author='PharmAI GmbH', - author_email='hello@pharm.ai', - license='GPLv2', - packages=find_packages(), - scripts=['plip/plipcmd.py'], - cmdclass={'build': CustomBuild, 'build_ext': CustomBuildExt, 'install': CustomInstall}, - install_requires=[ - 'numpy', - 'lxml' - ], - entry_points={ - "console_scripts": [ - "plip = plip.plipcmd:main" - ] - }, - zip_safe=False) From 9eacda9f44dd809f2e30ae245c2c14ac01af7316 Mon Sep 17 00:00:00 2001 From: sysadm Date: Fri, 3 Jul 2026 16:36:18 +0200 Subject: [PATCH 3/4] Prepare for release 3.0.1 --- plip/basic/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plip/basic/config.py b/plip/basic/config.py index 3d6c337..fdebdf4 100644 --- a/plip/basic/config.py +++ b/plip/basic/config.py @@ -1,4 +1,4 @@ -__version__ = '3.0.0' +__version__ = '3.0.1' __maintainer__ = 'PharmAI GmbH (2020-2021) - www.pharm.ai - hello@pharm.ai' __citation_information__ = "Schake,P. Bolz,SN. et al. PLIP 2025: introducing protein–protein interactions to the protein–ligand interaction profiler. " \ "Nucl. Acids Res. (10 May 2025), gkaf361. doi: 10.1093/nar/gkaf361" From 45abed4e25d628884fa918903f6edbb5d4cee0e2 Mon Sep 17 00:00:00 2001 From: Alex Mestiashvili Date: Fri, 3 Jul 2026 16:43:20 +0200 Subject: [PATCH 4/4] Update CHANGES.txt --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 51b4c85..2203a11 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,8 @@ Changelog --------- +# 3.0.1 +* remove setup.{py,cfg}, update pyproject.toml, use openbabel 3.2.0 + # 3.0.0 * added new `--regions` flag to enable detection of interactions between protein regions (by @snbolz) * reworked XML and TXT report file naming; changes default behavior