From nobody Tue Mar 21 19:27:42 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ph1pR0Njmz40hjD; Tue, 21 Mar 2023 19:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ph1pQ6drQz4N9B; Tue, 21 Mar 2023 19:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679426862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PtRPIubQOn9ft7Za5P1sanFotW3IfDCdHtBvWyDpId4=; b=BXjU7KkJL0MA5X5apdP61nnzcxAJpNSJ4cV+a6Ev//rj6eZlKV7e+sq/jU5Hz+PemHq14I fvogiXQSCCMDuKRHclQkWbeB7cv8QDgc9pahHfxuBiM2/vhxsiijFy+XR3p/QAp/GOIsbz wD3w8IWwJRTry8/vUAQj03S5/EahnIjGFtYC1OWHPRuSbfkqyLpOYej0oZUCsqUxr57EsV IfqE0Lpym7A1j0TP6PRbfPF3P6H8hUfmKor4B9xl3i/D+pTuZzL+RIixWLKkS0QhGRZEIs WZWQOSFAYS3IVZmuz9pcsZFzRHZT3rTs70FedmhnODISoDyofWrBSqGr5gxQLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679426862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PtRPIubQOn9ft7Za5P1sanFotW3IfDCdHtBvWyDpId4=; b=acI8wcZazxBgdg3Iz1CJKT2solTnfGFihMH7XzD5ftct4jha3JxvOGRZIh/+fUpc/t9abi sLOYvHhhzPpTvOPaa4BjvDlA28fJagPGo6hqbkLm4UFKGbOqEc5f2ss/SrsK/9kEFKDFeN TRK99v4U31LN3ILDZhUIXCeIr7AuCJMXP4yat3c1Hk5a5asZ0qTXYi7c1MOunEbdPZ1K5H ad/iT4PMZINglBo3EkCqUJYouCjrOY5x7Ai3nrsGOt3eZ8lHPn8wimQQzgutuikYV4dnPJ vPzkkgQEmNLaw/j77b7cxUxhR918bpYzLMWvsRGEdXY5iJxXRR64j9d66Y7HhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679426863; a=rsa-sha256; cv=none; b=WW5iBy09QUhUWk7+lRvrT5FmwtiVeeg8qolAkJILwcsfb+6BRwJzk60w408JzgB/V5e5+R uWW3SePH7xfuwdyewjdi5enP4QWrAur0OMOIe8jsnzh2LHnDjYRcWdx7HGp2EnVlwQ+Kir uqSEs5359tx1hB+SAA+iqUxVzAENaLiQL7BeE37hgqX9BPWbQ0x1DasQlWp5UK9bn0n4i3 e4sxVUTx5PNjG1zLU1Ski3l80lqNJRVrtJsIPIlhZ0Rty8MccKMxWMSenHZpa6CwCUAWvD rIJTenjWOCiDwz64qYVHpkPgDfX894IPLVL546N5thH4wLCU4xa04qJgAPoSDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ph1pQ5kd2zPYK; Tue, 21 Mar 2023 19:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32LJRg9S031257; Tue, 21 Mar 2023 19:27:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32LJRghn031256; Tue, 21 Mar 2023 19:27:42 GMT (envelope-from git) Date: Tue, 21 Mar 2023 19:27:42 GMT Message-Id: <202303211927.32LJRghn031256@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 26bb184591fe - main - devel/py-jupyter-packaging: Convert to USE_PYTHON=pep517 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26bb184591fe2b4ffb66954bbfa8d87908696eb7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=26bb184591fe2b4ffb66954bbfa8d87908696eb7 commit 26bb184591fe2b4ffb66954bbfa8d87908696eb7 Author: Po-Chuan Hsieh AuthorDate: 2023-03-21 18:44:18 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-03-21 19:20:45 +0000 devel/py-jupyter-packaging: Convert to USE_PYTHON=pep517 - Bump PORTREVISION for dependency and package change --- devel/py-jupyter-packaging/Makefile | 7 +++--- devel/py-jupyter-packaging/files/setup.py | 42 ------------------------------- 2 files changed, 3 insertions(+), 46 deletions(-) diff --git a/devel/py-jupyter-packaging/Makefile b/devel/py-jupyter-packaging/Makefile index 8103c60fc2ef..8b5aa1fb2f90 100644 --- a/devel/py-jupyter-packaging/Makefile +++ b/devel/py-jupyter-packaging/Makefile @@ -1,5 +1,6 @@ PORTNAME= jupyter-packaging PORTVERSION= 0.12.3 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,17 +13,15 @@ WWW= https://github.com/jupyter/jupyter-packaging LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0.25:devel/py-hatchling@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}deprecation>=0:devel/py-deprecation@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}tomlkit>=0:textproc/py-tomlkit@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} USES= python:3.7+ -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 - .include diff --git a/devel/py-jupyter-packaging/files/setup.py b/devel/py-jupyter-packaging/files/setup.py deleted file mode 100644 index 64bbbf2014d8..000000000000 --- a/devel/py-jupyter-packaging/files/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -from setuptools import setup - -setup( - name='jupyter-packaging', - version='%%PORTVERSION%%', - description='Jupyter Packaging Utilities.', - long_description='# Jupyter Packaging\n\nTools to help build and install Jupyter Python packages that require a pre-build step that may include JavaScript build steps.\n\n## Install\n\n`pip install jupyter-packaging`\n\n## Usage\n\nThere are three ways to use `jupyter-packaging` in another package.\nIn general, you should not depend on `jupyter_packaging` as a runtime dependency, only as a build dependency.\n\n### As a Build Requirement\n\nUse a `pyproject.toml` file as outlined in [pep-518](https://www.python.org/dev/peps/pep-0518/).\nAn example:\n\n```toml\n[build-system]\nrequires = ["jupyter_packaging>=0.10,<2"]\nbuild-backend = "setuptools.build_meta"\n```\n\nBelow is an example `setup.py` using the above config.\nIt assumes the rest of your metadata is in [`setup.cfg`](https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html).\nWe wrap the import in a try/catch to allow the file to be run without `jupyter_packaging`\nso that `python setup.py` can be ru n directly when not building.\n\n```py\nfrom setuptools import setup\n\ntry:\n from jupyter_packaging import wrap_installers, npm_builder\n builder = npm_builder()\n cmdclass = wrap_installers(pre_develop=builder, pre_dist=builder)\nexcept ImportError:\n cmdclass = {}\n\nsetup(cmdclass=cmdclass))\n```\n\n### As a Build Backend\n\nUse the `jupyter_packaging` build backend.\nThe pre-build command is specified as metadata in `pyproject.toml`:\n\n```toml\n[build-system]\nrequires = ["jupyter_packaging>=0.10,<2"]\nbuild-backend = "jupyter_packaging.build_api"\n\n[tool.jupyter-packaging.builder]\nfactory = "jupyter_packaging.npm_builder"\n\n[tool.jupyter-packaging.build-args]\nbuild_cmd = "build:src"\n```\n\nThe corresponding `setup.py` would be greatly simplified:\n\n```py\nfrom setuptools import setup\nsetup()\n```\n\nThe `tool.jupyter-packaging.builder` section expects a `func` value that points to an importable\nmodule and a function with dot separators. If not given, no pre-build function will run.\n\nThe optional! `tool.jupyter-packaging.build-args` sections accepts a dict of keyword arguments to\ngive to the pre-build command.\n\nThe build backend does not handle the `develop` command (`pip install -e .`).\nIf desired, you can wrap just that command:\n\n```py\nimport setuptools\n\ntry:\n from jupyter_packaging import wrap_installers, npm_builder\n builder = npm_builder(build_cmd="build:dev")\n cmdclass = wrap_installers(pre_develop=builder)\nexcept ImportError:\n cmdclass = {}\n\nsetup(cmdclass=cmdclass))\n```\n\nThe optional `tool.jupyter-packaging.options` section accepts the following options:\n\n- `skip-if-exists`: A list of local files whose presence causes the prebuild to skip\n- `ensured-targets`: A list of local file paths that should exist when the dist commands are run\n\n### As a Vendored File\n\nVendor `setupbase.py` locally alongside `setup.py` and import the module directly.\n\n```py\nimport setuptools\nfrom setupbase import wrap_installers, npm_builder\nfunc = npm _builder()\ncmdclass = wrap_installers(post_develop=func, pre_dist=func)\nsetup(cmdclass=cmdclass)\n```\n\n## Usage Notes\n\n- This package does not work with the deprecated `python setup.py bdist_wheel` or `python setup.py sdist` commands, PyPA recommends using the [build](https://pypa-build.readthedocs.io/en/latest/index.html) package (`pip install build && python -m build .`).\n- We recommend using `include_package_data=True` and `MANIFEST.in` to control the assets included in the [package](https://setuptools.readthedocs.io/en/latest/userguide/datafiles.html).\n- Tools like [`check-manifest`](https://github.com/mgedmin/check-manifest) or [`manifix`](https://github.com/vidartf/manifix) can be used to ensure the desired assets are included.\n- Simple uses of `data_files` can be handled in `setup.cfg` or in `setup.py`. If recursive directories are needed use `get_data_files()` from this package.\n- Unfortunately `data_files` are not supported in `develop` mode (a limitation of `set uptools`). You can work around it by doing ! a full in! stall (`pip install .`) before the develop install (`pip install -e .`), or by adding a script to push the data files to `sys.base_prefix`.\n\n## Development Install\n\n```bash\ngit clone https://github.com/jupyter/jupyter-packaging.git\ncd jupyter-packaging\npip install -e .[test]\npre-commit install\n```\n\nYou can test changes locally by creating a `pyproject.toml` with the following, replacing the local path to the git checkout:\n\n```toml\n[build-system]\nrequires = ["jupyter_packaging@file://"]\nbuild-backend = "setuptools.build_meta"\n```\n\nNote: you need to run `pip cache remove jupyter_packaging` any time changes are made to prevent `pip` from using a cached version of the source.\n', - author_email='Jupyter Development Team ', - classifiers=[ - 'Intended Audience :: Developers', - 'Intended Audience :: Science/Research', - 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - ], - install_requires=[ - 'deprecation', - 'packaging', - 'setuptools>=60.2.0', - 'tomlkit', - 'wheel', - ], - extras_require={ - 'test': [ - 'build', - 'coverage', - 'pre-commit', - 'pytest', - 'pytest-cov', - 'pytest-mock', - 'pytest-timeout', - ], - }, - packages=[ - 'jupyter_packaging', - ], -)