aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-08-21 16:51:58 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-08-21 17:01:58 +0000
commitd733ef5984f7ad2dce97acf09cb2619453f25415 (patch)
tree94dedf8cf398a796f67c9a319de3d394e468acda
parent7b98bdd020b1fa27dd7273303461332eb3010682 (diff)
net/py-blobfile: Add py-blobfile 2.0.2
blobfile is a library that provides a Python-like interface for reading local and remote files (only from blob storage), with an API similar to open() as well as some of the os.path and shutil functions. blobfile supports local paths, Google Cloud Storage paths (gs://<bucket>), and Azure Blob Storage paths (az://<account>/<container> or https://<account>.blob.core.windows.net/<container>/). The main function is BlobFile, which lets you open local and remote files that act more or less like local ones. There are also a few additional functions such as basename, dirname, and join, which mostly do the same thing as their os.path namesakes, only they also support GCS paths and ABS paths. This library is inspired by TensorFlow's gfile but does not have exactly the same interface.
-rw-r--r--net/Makefile1
-rw-r--r--net/py-blobfile/Makefile29
-rw-r--r--net/py-blobfile/distinfo3
-rw-r--r--net/py-blobfile/files/patch-pyproject.toml14
-rw-r--r--net/py-blobfile/pkg-descr14
5 files changed, 61 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 9f35b556f5f8..47d3553763cc 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1040,6 +1040,7 @@
SUBDIR += py-amqplib
SUBDIR += py-anonfile
SUBDIR += py-avahi
+ SUBDIR += py-blobfile
SUBDIR += py-bonsai
SUBDIR += py-cepa
SUBDIR += py-cjdns
diff --git a/net/py-blobfile/Makefile b/net/py-blobfile/Makefile
new file mode 100644
index 000000000000..9e030fbfdb32
--- /dev/null
+++ b/net/py-blobfile/Makefile
@@ -0,0 +1,29 @@
+PORTNAME= blobfile
+PORTVERSION= 2.0.2
+DISTVERSIONPREFIX= v
+CATEGORIES= net python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Read GCS, ABS and local paths with the same interface
+WWW= https://github.com/blobfile/blobfile
+
+LICENSE= UNLICENSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}astor>=0.8.0:devel/py-astor@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools>=42.0.0:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0.33.6:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}filelock>=3.0<4:sysutils/py-filelock@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}lxml>=4.9<5:devel/py-lxml@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pycryptodomex>=3.8<4:security/py-pycryptodomex@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}urllib3>=1.25.3,1<3,1:net/py-urllib3@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent pep517
+
+NO_ARCH= yes
+
+USE_GITHUB= yes
+
+.include <bsd.port.mk>
diff --git a/net/py-blobfile/distinfo b/net/py-blobfile/distinfo
new file mode 100644
index 000000000000..18cc15d09bdd
--- /dev/null
+++ b/net/py-blobfile/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1692211617
+SHA256 (blobfile-blobfile-v2.0.2_GH0.tar.gz) = 685a36a7f90bde5c81b7d7f08a472c4dd63e24772b165be16a752213f8075cf5
+SIZE (blobfile-blobfile-v2.0.2_GH0.tar.gz) = 83871
diff --git a/net/py-blobfile/files/patch-pyproject.toml b/net/py-blobfile/files/patch-pyproject.toml
new file mode 100644
index 000000000000..0f913e50f4b8
--- /dev/null
+++ b/net/py-blobfile/files/patch-pyproject.toml
@@ -0,0 +1,14 @@
+--- pyproject.toml.orig 2023-04-21 05:36:25 UTC
++++ pyproject.toml
+@@ -1,6 +1,6 @@
+ [build-system]
+ requires = [
+- "setuptools == 42.0.0",
+- "wheel == 0.33.6",
+- "astor == 0.8.0",
+-]
+\ No newline at end of file
++ "setuptools >= 42.0.0",
++ "wheel >= 0.33.6",
++ "astor >= 0.8.0",
++]
diff --git a/net/py-blobfile/pkg-descr b/net/py-blobfile/pkg-descr
new file mode 100644
index 000000000000..28dea92d06b4
--- /dev/null
+++ b/net/py-blobfile/pkg-descr
@@ -0,0 +1,14 @@
+blobfile is a library that provides a Python-like interface for reading local
+and remote files (only from blob storage), with an API similar to open() as well
+as some of the os.path and shutil functions. blobfile supports local paths,
+Google Cloud Storage paths (gs://<bucket>), and Azure Blob Storage paths
+(az://<account>/<container> or
+https://<account>.blob.core.windows.net/<container>/).
+
+The main function is BlobFile, which lets you open local and remote files that
+act more or less like local ones. There are also a few additional functions such
+as basename, dirname, and join, which mostly do the same thing as their os.path
+namesakes, only they also support GCS paths and ABS paths.
+
+This library is inspired by TensorFlow's gfile but does not have exactly the
+same interface.