aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorwg <wg@FreeBSD.org>2015-07-15 03:53:38 +0800
committerwg <wg@FreeBSD.org>2015-07-15 03:53:38 +0800
commite1d0022f20f21593fbe5b6e358b79b2b85984bbf (patch)
treea8b1742dd72c46e364b4a3b435a84e727a02af8a /math
parent771336ab344e54168d2fac013a4f58480fa8a2fc (diff)
downloadfreebsd-ports-gnome-e1d0022f20f21593fbe5b6e358b79b2b85984bbf.tar.gz
freebsd-ports-gnome-e1d0022f20f21593fbe5b6e358b79b2b85984bbf.tar.zst
freebsd-ports-gnome-e1d0022f20f21593fbe5b6e358b79b2b85984bbf.zip
math/py-bitmath: Represent and manipulate file sizes with different prefix notations
bitmath simplifies many facets of interacting with file sizes in various units. Functionality includes: - Converting between SI and NIST prefix units (kB to GiB) - Converting between units of the same type (SI to SI, or NIST to NIST) - Automatic human-readable prefix selection (like in hurry.filesize) - Basic arithmetic operations (subtracting 42KiB from 50GiB) - Rich comparison operations (1024 Bytes == 1KiB) - bitwise operations (<<, >>, &, |, ^) - argparse integration - progressbar integration - String parsing - Sorting WWW: https://github.com/tbielawa/bitmath
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/py-bitmath/Makefile23
-rw-r--r--math/py-bitmath/distinfo2
-rw-r--r--math/py-bitmath/pkg-descr15
4 files changed, 41 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index aafddc98e28c..f1028e1ee53a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -551,6 +551,7 @@
SUBDIR += py-apgl
SUBDIR += py-basemap
SUBDIR += py-basemap-data
+ SUBDIR += py-bitmath
SUBDIR += py-bitvector
SUBDIR += py-bottleneck
SUBDIR += py-cryptominisat
diff --git a/math/py-bitmath/Makefile b/math/py-bitmath/Makefile
new file mode 100644
index 000000000000..ca41d6faa657
--- /dev/null
+++ b/math/py-bitmath/Makefile
@@ -0,0 +1,23 @@
+# $FreeBSD$
+
+PORTNAME= bitmath
+PORTVERSION= 1.2.3
+CATEGORIES= math python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME}
+DISTFILES= ${PORTNAME}-${PORTVERSION}-4.tar.gz
+
+MAINTAINER= wg@FreeBSD.org
+COMMENT= Represent and manipulate file sizes with different prefix notations
+
+LICENSE= MIT
+
+USES= python:2
+USE_PYTHON= autoplist distutils
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-4
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}progressbar231>0:${PORTSDIR}/misc/py-progressbar231
+
+.include <bsd.port.mk>
diff --git a/math/py-bitmath/distinfo b/math/py-bitmath/distinfo
new file mode 100644
index 000000000000..f16d705ec6f1
--- /dev/null
+++ b/math/py-bitmath/distinfo
@@ -0,0 +1,2 @@
+SHA256 (bitmath-1.2.3-4.tar.gz) = 09fd3697dd0f0bbfd7de1c8821f739d6f4cf0cb854b3314779bcbd3ec9c90ed8
+SIZE (bitmath-1.2.3-4.tar.gz) = 50745
diff --git a/math/py-bitmath/pkg-descr b/math/py-bitmath/pkg-descr
new file mode 100644
index 000000000000..6a72c73dd9f0
--- /dev/null
+++ b/math/py-bitmath/pkg-descr
@@ -0,0 +1,15 @@
+bitmath simplifies many facets of interacting with file sizes in various units.
+Functionality includes:
+
+- Converting between SI and NIST prefix units (kB to GiB)
+- Converting between units of the same type (SI to SI, or NIST to NIST)
+- Automatic human-readable prefix selection (like in hurry.filesize)
+- Basic arithmetic operations (subtracting 42KiB from 50GiB)
+- Rich comparison operations (1024 Bytes == 1KiB)
+- bitwise operations (<<, >>, &, |, ^)
+- argparse integration
+- progressbar integration
+- String parsing
+- Sorting
+
+WWW: https://github.com/tbielawa/bitmath