textproc/py-furo: Convert to USE_PYTHON=pep517

- Bump PORTREVISION for package change

Upstream builds this port with sphinx-theme-builder. However, it does not work
on FreeBSD yet since the nodeenv would try to download pre-built node.js binary
executable which is unavailable for FreeBSD. Therefore, I use flit-core with
pre-built static files instead.
This commit is contained in:
Po-Chuan Hsieh 2024-09-09 02:21:18 +08:00
parent 829e800f04
commit 85c3d8fce4
No known key found for this signature in database
GPG key ID: 9A4BD10F002DD04B
3 changed files with 24 additions and 66 deletions

View file

@ -1,5 +1,6 @@
PORTNAME= furo
PORTVERSION= 2024.8.6
PORTREVISION= 1
CATEGORIES= textproc python
MASTER_SITES= PYPI \
LOCAL/sunpoet:static
@ -15,18 +16,19 @@ WWW= https://pradyunsg.me/furo/ \
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flit-core>=3.9.0:devel/py-flit-core@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}beautifulsoup>=0:www/py-beautifulsoup@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pygments>=2.7:textproc/py-pygments@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinx>=5.0,1<9.0,1:textproc/py-sphinx@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinx-basic-ng>=1.0.0b2:textproc/py-sphinx-basic-ng@${PY_FLAVOR}
USES= python
USE_PYTHON= autoplist concurrent distutils
USE_PYTHON= autoplist concurrent pep517
NO_ARCH= yes
post-patch:
@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
@${FIND} ${WRKSRC} -name .gitignore -delete
post-install:
cd ${WRKDIR}/static/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PYTHON_SITELIBDIR}/furo/theme/furo/static/

View file

@ -0,0 +1,20 @@
--- pyproject.toml.orig 2024-07-24 09:09:51 UTC
+++ pyproject.toml
@@ -1,6 +1,6 @@
[build-system]
-requires = ["sphinx-theme-builder >= 0.2.0a10"]
-build-backend = "sphinx_theme_builder"
+requires = ["flit-core >= 3.9.0"]
+build-backend = "flit_core.buildapi"
[tool.sphinx-theme-builder]
node-version = "18.16.0"
@@ -15,7 +15,7 @@ dependencies = [
requires-python = ">=3.8"
dependencies = [
"beautifulsoup4",
- "sphinx >= 6.0,<9.0",
+ "sphinx >= 5.0,<9.0",
"sphinx-basic-ng >= 1.0.0.beta2",
"pygments >= 2.7",
]

View file

@ -1,64 +0,0 @@
#!/usr/bin/env python
# setup.py generated by flit for tools that don't yet use PEP 517
from distutils.core import setup
packages = \
['furo']
package_data = \
{'': ['*'],
'furo': ['assets/*',
'assets/scripts/*',
'assets/styles/*',
'assets/styles/base/*',
'assets/styles/components/*',
'assets/styles/content/*',
'assets/styles/extensions/*',
'assets/styles/variables/*',
'theme/*',
'theme/furo/*',
'theme/furo/components/*',
'theme/furo/partials/*',
'theme/furo/sidebar/*',
'theme/furo/static/*']}
package_dir = \
{'': 'src'}
install_requires = \
['beautifulsoup4', 'sphinx >= 5.0,<9.0', 'sphinx-basic-ng >= 1.0.0.beta2', 'pygments >= 2.7']
entry_points = \
{'sphinx.html_themes': ['furo = furo']}
setup(name='furo',
version='%%PORTVERSION%%',
description='A clean customisable Sphinx documentation theme.',
author=None,
author_email='Pradyun Gedam <mail@pradyunsg.me>',
classifiers=[
'Framework :: Sphinx',
'Framework :: Sphinx :: Theme',
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Operating System :: OS Independent',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
],
url=None,
packages=packages,
package_data=package_data,
package_dir=package_dir,
install_requires=install_requires,
entry_points=entry_points,
python_requires='>=3.8',
)