Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devel/py-pyTooling: New port: Collection of arbitrary classes, decora…
…tors, meta-classes, exceptions
- Loading branch information
Showing
5 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
PORTNAME= pyTooling | ||
DISTVERSIONPREFIX= v | ||
DISTVERSION= 2.12.3 | ||
CATEGORIES= devel | ||
#MASTER_SITES= PYPI # requirements.txt is missing | ||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} | ||
|
||
MAINTAINER= yuri@FreeBSD.org | ||
COMMENT= Collection of arbitrary classes, decorators, meta-classes, exceptions | ||
WWW= https://pytooling.github.io/pyTooling/ | ||
|
||
LICENSE= APACHE20 | ||
LICENSE_FILE= ${WRKSRC}/LICENSE.md | ||
|
||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}wheel>=0.38.1:devel/py-wheel@${PY_FLAVOR} | ||
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}anytree>=2.8.0:devel/py-anytree@${PY_FLAVOR} \ | ||
${PYTHON_PKGNAMEPREFIX}coverage>0:devel/py-coverage@${PY_FLAVOR} \ | ||
${PYTHON_PKGNAMEPREFIX}itertree>0:devel/py-itertree@${PY_FLAVOR} \ | ||
${PYTHON_PKGNAMEPREFIX}lxml>=4.9:devel/py-lxml@${PY_FLAVOR} \ | ||
${PYTHON_PKGNAMEPREFIX}mypy>=0.990:devel/py-mypy@${PY_FLAVOR} \ | ||
${PYTHON_PKGNAMEPREFIX}networkx>=2.6:math/py-networkx@${PY_FLAVOR} \ | ||
${PYTHON_PKGNAMEPREFIX}pytest-benchmark>0:devel/py-pytest-benchmark@${PY_FLAVOR} \ | ||
${PYTHON_PKGNAMEPREFIX}python-igraph>0:math/py-python-igraph@${PY_FLAVOR} \ | ||
${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \ | ||
${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0.17:devel/py-ruamel.yaml@${PY_FLAVOR} | ||
|
||
USES= python | ||
USE_PYTHON= pep517 autoplist pytest | ||
USE_GITHUB= yes | ||
|
||
NO_ARCH= yes | ||
|
||
TEST_WRKSRC= ${WRKSRC}/tests | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESTAMP = 1677176526 | ||
SHA256 (pyTooling-pyTooling-v2.12.3_GH0.tar.gz) = 03c7d042500490f21ddebcc65a158e749208e9af2f9a551274d39e04957c8bbc | ||
SIZE (pyTooling-pyTooling-v2.12.3_GH0.tar.gz) = 580323 |
40 changes: 40 additions & 0 deletions
40
devel/py-pyTooling/files/patch-pyTooling_Common_Platform.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- pyTooling/Common/Platform.py.orig 2023-02-23 18:45:13 UTC | ||
+++ pyTooling/Common/Platform.py | ||
@@ -52,10 +52,11 @@ class Platform(metaclass=ExtendedType, singleton=True) | ||
Unknown = 0 | ||
|
||
OS_Linux = auto() #: Operating System: Linux. | ||
+ OS_FreeBSD = auto() #: Operating System: FreeBSD. | ||
OS_MacOS = auto() #: Operating System: macOS. | ||
OS_Windows = auto() #: Operating System: Windows. | ||
|
||
- OperatingSystem = OS_Linux | OS_MacOS | OS_Windows #: Mask: Any operating system. | ||
+ OperatingSystem = OS_Linux | OS_FreeBSD | OS_MacOS | OS_Windows #: Mask: Any operating system. | ||
|
||
SEP_WindowsPath = auto() #: Seperator: Path element seperator (e.g. for directories). | ||
SEP_WindowsValue = auto() #: Seperator: Value seperator in variables (e.g. for paths in PATH). | ||
@@ -76,6 +77,7 @@ class Platform(metaclass=ExtendedType, singleton=True) | ||
Architecture = Arch_x86 | Arch_Arm #: Mask: Any architecture. | ||
|
||
Linux = OS_Linux | ENV_Native | ARCH_x86_64 #: Group: native Linux on x86-64. | ||
+ FreeBSD = OS_FreeBSD | ENV_Native | ARCH_x86_64 #: Group: native FreeBSD on x86-64. | ||
MacOS = OS_MacOS | ENV_Native | ARCH_x86_64 #: Group: native macOS on x86-64. | ||
Windows = OS_Windows | ENV_Native | ARCH_x86_64 | SEP_WindowsPath | SEP_WindowsValue #: Group: native Windows on x86-64. | ||
|
||
@@ -155,6 +157,16 @@ class Platform(metaclass=ExtendedType, singleton=True) | ||
self._platform |= self.Platforms.ARCH_x86_32 | ||
else: | ||
raise Exception(f"Unknown architecture '{sysconfig_platform}' for a native Linux.") | ||
+ | ||
+ elif sys_platform.startswith("freebsd"): | ||
+ self._platform |= self.Platforms.OS_FreeBSD | self.Platforms.ENV_Native | ||
+ | ||
+ if sysconfig_platform.endswith("-amd64"): # native FreeBSD amd64; Windows 64 + WSL | ||
+ self._platform |= self.Platforms.ARCH_x86_64 | ||
+ elif sysconfig_platform.endswith("-aarch64"): # native FreeBSD Aarch64 | ||
+ self._platform |= self.Platforms.ARCH_x86_32 | ||
+ else: | ||
+ raise Exception(f"Unknown architecture '{sysconfig_platform}' for a native FreeBSD.") | ||
|
||
elif sys_platform == "darwin": | ||
self._platform |= self.Platforms.OS_MacOS | self.Platforms.ENV_Native | self.Platforms.ARCH_x86_64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pyTooling is a powerful collection of arbitrary useful abstract data models, | ||
classes, decorators, meta-classes and exceptions. It also provides lots of | ||
helper functions e.g. to ease the handling of package descriptions. | ||
|
||
It's useful for any Python-base project independent if it's a library, | ||
framework or CLI tool. |