2021-02-27 13:28:21 +01:00
|
|
|
PORTNAME= wcmatch
|
2023-08-31 09:29:20 +02:00
|
|
|
PORTVERSION= 8.5
|
2021-02-27 13:28:21 +01:00
|
|
|
CATEGORIES= textproc python
|
2023-01-11 16:47:15 +01:00
|
|
|
MASTER_SITES= PYPI
|
2021-02-27 13:28:21 +01:00
|
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
|
|
|
|
MAINTAINER= matthew@FreeBSD.org
|
|
|
|
COMMENT= Wildcard/glob file name matcher
|
2022-09-07 23:06:12 +02:00
|
|
|
WWW= https://pypi.org/project/wcmatch/
|
2021-02-27 13:28:21 +01:00
|
|
|
|
|
|
|
LICENSE= MIT
|
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE.md
|
|
|
|
|
textproc/py-wcmatch: update to 8.4.1
The upstream package nolonger uses python setuptools, instead building
a wheel using hatchling. There is no build target to install the
python module directly -- the generated wheel has to be processed by
pip. Indeed, with the PEP-517 support in recent versions of pip, the
whole package can be built and installed in one commandline using pip.
There are two approaches here:
* maintain our own setup.py etc. to recreate the setuptools support
from older versions -- an approach taken in
textproc/py-pymdown-extensions, which is another package by the
same upstream author with similar tooling.
* alternatively, embrace the new python build system, using
hatchling to create a python wheel and pip to install it to
staging.
I chose the latter, but it is trickier than it seems. pip is not
really designed for installing to a staging location as required when
building a port. pip options for manipulating the installation prefix
(--root, --prefix) pollute the installed _pycache_ files with the
staging directory path. In fact, this only works at all, because
everything in this package is installed under PYTHON_SITELIBDIR and we
can set the `--target` option to ${STAGING}${PYTHON_SITELIBDIR} to
achive the desired effect.
The PEP-517 ideal would be to use pip to build and install everything,
and manage all the dependency resolution etc., but that's not
compatible with port building. Fortunately, it is possible to turn
off all of the unrequired functionality.
It would be cleaner to implement a python module to directly convert
wheels into FreeBSD pkgs, or vice-versa.
Changes: https://github.com/facelessuser/wcmatch/releases/tag/8.4
Changes: https://github.com/facelessuser/wcmatch/releases/tag/8.4.1
2022-12-12 14:38:19 +01:00
|
|
|
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0.21.1:devel/py-hatchling@${PY_FLAVOR} \
|
|
|
|
${PYTHON_PKGNAMEPREFIX}pip>=22.2:devel/py-pip@${PY_FLAVOR}
|
2022-01-10 20:22:15 +01:00
|
|
|
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bracex>=2.1.1:textproc/py-bracex@${PY_FLAVOR}
|
2021-02-27 13:28:21 +01:00
|
|
|
|
2023-03-27 15:19:36 +02:00
|
|
|
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \
|
2021-02-27 13:28:21 +01:00
|
|
|
${PYTHON_PKGNAMEPREFIX}coverage>0:devel/py-coverage@${PY_FLAVOR}
|
|
|
|
|
2023-06-15 00:00:28 +02:00
|
|
|
USES= python
|
2023-03-27 18:01:31 +02:00
|
|
|
USE_PYTHON= autoplist pep517 pytest
|
textproc/py-wcmatch: update to 8.4.1
The upstream package nolonger uses python setuptools, instead building
a wheel using hatchling. There is no build target to install the
python module directly -- the generated wheel has to be processed by
pip. Indeed, with the PEP-517 support in recent versions of pip, the
whole package can be built and installed in one commandline using pip.
There are two approaches here:
* maintain our own setup.py etc. to recreate the setuptools support
from older versions -- an approach taken in
textproc/py-pymdown-extensions, which is another package by the
same upstream author with similar tooling.
* alternatively, embrace the new python build system, using
hatchling to create a python wheel and pip to install it to
staging.
I chose the latter, but it is trickier than it seems. pip is not
really designed for installing to a staging location as required when
building a port. pip options for manipulating the installation prefix
(--root, --prefix) pollute the installed _pycache_ files with the
staging directory path. In fact, this only works at all, because
everything in this package is installed under PYTHON_SITELIBDIR and we
can set the `--target` option to ${STAGING}${PYTHON_SITELIBDIR} to
achive the desired effect.
The PEP-517 ideal would be to use pip to build and install everything,
and manage all the dependency resolution etc., but that's not
compatible with port building. Fortunately, it is possible to turn
off all of the unrequired functionality.
It would be cleaner to implement a python module to directly convert
wheels into FreeBSD pkgs, or vice-versa.
Changes: https://github.com/facelessuser/wcmatch/releases/tag/8.4
Changes: https://github.com/facelessuser/wcmatch/releases/tag/8.4.1
2022-12-12 14:38:19 +01:00
|
|
|
|
2023-03-27 15:19:36 +02:00
|
|
|
# Windows specific tests
|
|
|
|
PYTEST_IGNORED_TESTS= test_escape_windows \
|
|
|
|
test_norm_windows \
|
|
|
|
test_escape_windows \
|
|
|
|
test_drive_insensitive \
|
|
|
|
test_drive_sensitive \
|
|
|
|
test_root_win \
|
|
|
|
test_glob_match_real_ignore_forceunix
|
2021-02-27 13:28:21 +01:00
|
|
|
|
|
|
|
NO_ARCH= yes
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|