git: e42721f76d70 - main - science/py-pubchempy: New port: Python wrapper for the PubChem PUG REST API

Yuri Victorovich <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <[email protected]>
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e42721f76d70eb046ac8504aeb60fdc65f72450e

commit e42721f76d70eb046ac8504aeb60fdc65f72450e
Author:     Yuri Victorovich <[email protected]>
AuthorDate: 2026-08-01 06:36:53 +0000
Commit:     Yuri Victorovich <[email protected]>
CommitDate: 2026-08-01 06:50:07 +0000

    science/py-pubchempy: New port: Python wrapper for the PubChem PUG REST API
---
 science/Makefile                                |  1 +
 science/py-pubchempy/Makefile                   | 24 +++++++++++++++++
 science/py-pubchempy/distinfo                   |  3 +++
 science/py-pubchempy/files/patch-pyproject.toml | 35 +++++++++++++++++++++++++
 science/py-pubchempy/pkg-descr                  |  4 +++
 5 files changed, 67 insertions(+)

diff --git a/science/Makefile b/science/Makefile
index c534521facde..15771d0291c1 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -415,6 +415,7 @@
     SUBDIR += py-plumed
     SUBDIR += py-pnetcdf
     SUBDIR += py-probeinterface
+    SUBDIR += py-pubchempy
     SUBDIR += py-pupynere
     SUBDIR += py-py3Dmol
     SUBDIR += py-pyaixi
diff --git a/science/py-pubchempy/Makefile b/science/py-pubchempy/Makefile
new file mode 100644
index 000000000000..ba9aa414b5d0
--- /dev/null
+++ b/science/py-pubchempy/Makefile
@@ -0,0 +1,24 @@
+PORTNAME=	pubchempy
+DISTVERSION=	1.0.5
+CATEGORIES=	science python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	[email protected]
+COMMENT=	Python wrapper for the PubChem PUG REST API
+WWW=		https://github.com/mcs07/PubChemPy
+
+LICENSE=	MIT
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=61.0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+
+USES=		python:3.10+
+USE_PYTHON=	autoplist pep517
+
+NO_ARCH=	yes
+
+# tests as of 1.0.5: not enabled because every upstream test queries the live
+# PubChem REST API, which is unavailable in the clean poudriere test environment.
+
+.include <bsd.port.mk>
diff --git a/science/py-pubchempy/distinfo b/science/py-pubchempy/distinfo
new file mode 100644
index 000000000000..8775f06a5579
--- /dev/null
+++ b/science/py-pubchempy/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1785523733
+SHA256 (pubchempy-1.0.5.tar.gz) = 08f0b2a82a5caa5d61e14935d655da554602d7b5686fe661ab584c882ffff623
+SIZE (pubchempy-1.0.5.tar.gz) = 26814
diff --git a/science/py-pubchempy/files/patch-pyproject.toml b/science/py-pubchempy/files/patch-pyproject.toml
new file mode 100644
index 000000000000..43c22d5a722d
--- /dev/null
+++ b/science/py-pubchempy/files/patch-pyproject.toml
@@ -0,0 +1,35 @@
+-- Normalize the project name to lowercase and fix invalid PEP 621 license
+-- declaration. Upstream places license-files under [project], which is not
+-- allowed by PEP 621, and uses license = "MIT" instead of the PEP 621 text
+-- form. Newer setuptools rejects the resulting [project] table. Lowercasing
+-- the name also makes the produced wheel match the filename the ports
+-- PEP 517 installer expects.
+-- The setuptools requirement is lowered to the version available in ports.
+--- pyproject.toml.orig
++++ pyproject.toml
+@@ -1,11 +1,10 @@
+ [project]
+-name = "PubChemPy"
++name = "pubchempy"
+ version = "1.0.5"
+ description = "A simple Python wrapper around the PubChem PUG REST API."
+ readme = "README.md"
+ authors = [{ name = "Matt Swain", email = "[email protected]" }]
+-license = "MIT"
+-license-files = ["LICENSE"]
++license = {text = "MIT"}
+ requires-python = ">=3.10"
+ dependencies = []
+ keywords = ["pubchem", "python", "rest", "api", "chemistry", "cheminformatics"]
+@@ -54,9 +53,10 @@
+
+ [tool.setuptools]
+ py-modules = ["pubchempy"]
++license-files = ["LICENSE"]
+
+ [build-system]
+-requires = ["setuptools>=77.0.3"]
++requires = ["setuptools>=61.0"]
+ build-backend = "setuptools.build_meta"
+
+ [tool.pytest.ini_options]
diff --git a/science/py-pubchempy/pkg-descr b/science/py-pubchempy/pkg-descr
new file mode 100644
index 000000000000..4b8673135e00
--- /dev/null
+++ b/science/py-pubchempy/pkg-descr
@@ -0,0 +1,4 @@
+PubChemPy provides a way to interact with PubChem in Python. It allows
+chemical searches by name, substructure and similarity, chemical
+standardization, conversion between chemical file formats, depiction
+and retrieval of chemical properties.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.