ports/devel/py-virtualenv/Makefile
Danilo G. Baio 75a5f7f076 Update Sphinx
- Repocopy textproc/py-sphinx to textproc/py-sphinx18

  Update it to 1.8.5 (latest version from 1.8.X).
  This version supports Python 2 and 3.
  Add test target.

- textproc/py-sphinx: Update to 3.0.2

  Python 3 only (3.5+).
  Add test target.

- Mk/Uses/python.mk: Add PY_SPHINX

  Shared macro to use with flavors and not break
  ports with USES=python (all versions).

  Python >=3.5  --> textproc/py-sphinx (v3.0.2)
  Python < 3.5  --> textproc/py-sphinx18 (v1.8.5)

  All ports that uses sphinx were changed to use the new variable
  ${PY_SPHINX} in the dependency line, exceptions:

    * Ports that fails to build with sphinx 3.0.2 because of code.
      They are pointing to textproc/py-sphinx18 directly.
      There aren't many ports.

    * Ports that doesn't know Python flavors.

- Add several patches to fix Sphinx consumers

  The most common issues are related with pkg-plist, the output
  files from Sphinx changes between versions, keep this dynamically
  is the better approach.

  This will save time in future sphinx updates.

PR:		245629
Exp-run by:	antoine
2020-05-11 23:51:58 +00:00

51 lines
1.4 KiB
Makefile

# $FreeBSD$
PORTNAME= virtualenv
PORTVERSION= 16.7.5
PORTREVISION= 0
CATEGORIES= devel python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= nivit@FreeBSD.org
COMMENT= Tool for creating isolated Python environments
LICENSE= MIT
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR}
DOCS_BUILD_DEPENDS= ${PY_SPHINX} \
${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}towncrier>0:textproc/py-towncrier@${PY_FLAVOR}
.if ${FLAVOR:U:Mpy27}
DOCS_BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pathlib2>0:devel/py-pathlib2@${PY_FLAVOR}
.endif
DOCS_PORTDOCS= *
DOCS_VARS= PYDISTUTILS_BUILD_TARGET="build build_sphinx"
# Required by towncrier/click when Python < 3.7
# see https://click.palletsprojects.com/en/7.x/python3/
# Documentation is in English, so...
MAKE_ENV= LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
GH_ACCOUNT= pypa
NO_ARCH= yes
OPTIONS_DEFINE= DOCS
PYDISTUTILS_BUILDARGS= -c ${WRKSRC}/docs
USES= python
USE_GITHUB= yes
USE_PYTHON= autoplist concurrent distutils
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC}/build/sphinx/html && \
${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} "! -name .buildinfo -or -name objects.inv")
regression-test: build
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
.include <bsd.port.mk>