From nobody Fri Dec 30 09:09:43 2022 X-Original-To: dev-commits-ports-main@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 4Njzwm1WQXz2kcsH; Fri, 30 Dec 2022 09:09:44 +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 4Njzwl6LQdz3xJw; Fri, 30 Dec 2022 09:09:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672391383; 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=ftMOYGPYoyrZWEpi7lSRvsLFK5ExQopMKTHwd6mCo5w=; b=nT/j0OkWBwmemOVWpCFs5olUoI7KtqJaZFv+h1EbhchUTBFJIo/LHHxZ2ELeZIvv9g72r2 r0JdglEE6yvABuCywAOTDZdi69h9bBF5OyUd/DC8lgxzeaKR/S8s0KF2J0lY3GvduU0DkI FYR/dk1MhokRJLKNgMhtKIfWDjWvvZH70HnNTEd+QitcYEMKfJ/TxYAwnmIqbOxNl7qjYf 7ea+F51z7DhYChntnKDsWlvxmPiJ85QtCbyXnb8PbTt5nLQK/j1YfQZUSaqXR77TVST5hy 6xN5MLhq3S5UBmoOFk34rW3+OE63hJ4NafXAGtvtUeJfJ4Hw/Y9VSOmrm3FPvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672391383; 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=ftMOYGPYoyrZWEpi7lSRvsLFK5ExQopMKTHwd6mCo5w=; b=uuKO0t2QmildzuGl23AwCV4rdYEA8FZukLcdFeZBJufKFG0FJt4+YNUYEcNjGctEU+sKwP FjBR46zgGbwGjHTnxZEEx/woY5LMlPSJ7l1nEIRz0GCg9ho+BuoBu3q2Sl5gnt3voWKBEO uFHUT01kmx8oZUD8VWV/zM9hg9syep7FD93kR12gyZhweTjdUGPmohvvAuH/p8ZZ8k1AjR 7c/o/wg5dM+mH5G0LTHUYxsTjURG6DpzIt3tTveqt94FabmKr+uA2dZflzIBlUKc+4gaHQ Tk7H/zDfL3q9NDElpnMPBxp71SSJjQ2qp5Mgo2Js5BKzd0RZY9KSgNFKF16LLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672391383; a=rsa-sha256; cv=none; b=kPmwqV73g9UyoD6s9RG1L4Y8TwgDBffQdwMUOPi2DUUAlxinKx8xADhJtikhJYpVmrPsr9 YBFbTTqN8B2FgqxSmSSmjmoMM9T82XqQb5w1Wt02H9JKrtIJndDIbL9tiaiZ3qY9dYXMEi 34muOoIvgnnuHX7mbMM/mh6wcBWNiQA2/7PyFWrAvBisdA1NKNQMyobLWpwhhX/SnbVVlU tuW1wLLHmXVxFxLErPmzgY0xPmG1ST36vzLFAaQCVyM9+J68QUdsU5j+0pvELg1zRtDc8s 55PGHRdzO3FLKujZg3kz3IL6ZEl1sa+Q4sXYN08DbLRr1/N4NTgtRpGdISaaGA== 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 4Njzwl5Qltz12QP; Fri, 30 Dec 2022 09:09:43 +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 2BU99h4T001845; Fri, 30 Dec 2022 09:09:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BU99h4h001844; Fri, 30 Dec 2022 09:09:43 GMT (envelope-from git) Date: Fri, 30 Dec 2022 09:09:43 GMT Message-Id: <202212300909.2BU99h4h001844@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: 46f3874290cc - main - audio/py-pylast: Update to 5.1.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@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: 46f3874290cc5131f30a421de058cd860af25010 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=46f3874290cc5131f30a421de058cd860af25010 commit 46f3874290cc5131f30a421de058cd860af25010 Author: Po-Chuan Hsieh AuthorDate: 2022-12-30 08:41:46 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-12-30 09:04:25 +0000 audio/py-pylast: Update to 5.1.0 - Convert to USE_PYTHON=pytest Changes: https://github.com/pylast/pylast/releases --- audio/py-pylast/Makefile | 13 +++++++++--- audio/py-pylast/distinfo | 6 +++--- audio/py-pylast/files/setup.py | 46 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/audio/py-pylast/Makefile b/audio/py-pylast/Makefile index 7cf00ab9e3e8..6b04f10457e9 100644 --- a/audio/py-pylast/Makefile +++ b/audio/py-pylast/Makefile @@ -1,5 +1,5 @@ PORTNAME= pylast -PORTVERSION= 5.0.0 +PORTVERSION= 5.1.0 CATEGORIES= audio python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -11,13 +11,17 @@ WWW= https://github.com/pylast/pylast LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/COPYING -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}httpx>=0:www/py-httpx@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flaky>=0:devel/py-flaky@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-random-order>=0:devel/py-pytest-random-order@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml@${PY_FLAVOR} USES= python:3.7+ -USE_PYTHON= autoplist concurrent distutils +USE_PYTHON= autoplist concurrent distutils pytest NO_ARCH= yes +TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} .include @@ -25,4 +29,7 @@ NO_ARCH= yes RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR} .endif +post-patch: + @${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py + .include diff --git a/audio/py-pylast/distinfo b/audio/py-pylast/distinfo index b8cda871d2aa..b3fd4ca76635 100644 --- a/audio/py-pylast/distinfo +++ b/audio/py-pylast/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1650228744 -SHA256 (pylast-5.0.0.tar.gz) = 5018b66c2b4632d71abd8103b73e66e4dd14c6609a8f7ba7e5aa26c736df2df8 -SIZE (pylast-5.0.0.tar.gz) = 43871 +TIMESTAMP = 1669057653 +SHA256 (pylast-5.1.0.tar.gz) = 89300fdcdf423d7be0606bdc44da27c3b48c4d73aa1d4cb12672cc006c979bdc +SIZE (pylast-5.1.0.tar.gz) = 40517 diff --git a/audio/py-pylast/files/setup.py b/audio/py-pylast/files/setup.py new file mode 100644 index 000000000000..a7a5b7058c08 --- /dev/null +++ b/audio/py-pylast/files/setup.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +from setuptools import setup + +setup( + name='pylast', + version='%%PORTVERSION', + description='A Python interface to Last.fm and Libre.fm', + long_description='# pyLast\n\n[![PyPI version](https://img.shields.io/pypi/v/pylast.svg)](https://pypi.org/project/pylast/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/pylast.svg)](https://pypi.org/project/pylast/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/pylast.svg)](https://pypistats.org/packages/pylast)\n[![Test](https://github.com/pylast/pylast/workflows/Test/badge.svg)](https://github.com/pylast/pylast/actions)\n[![Coverage (Codecov)](https://codecov.io/gh/pylast/pylast/branch/main/graph/badge.svg)](https://codecov.io/gh/pylast/pylast)\n[![Code style: Black](https://img.shields.io/badge/code%20style-Black-000000.svg)](https://github.com/psf/black)\n[![DOI](https://zenodo.org/badge/7803088.svg)](https://zenodo.org/badge/latestdoi/7803088)\n\nA Python interface to [Last.fm](https://www.last.fm/) and other API-compatible websites\nsuch as [Libre.fm](https://libre.fm/).\n\nUse the pydoc utility for help on usage or see [tests/](tests/) for ex amples.\n\n## Installation\n\nInstall via pip:\n\n```sh\npython3 -m pip install pylast\n```\n\nInstall latest development version:\n\n```sh\npython3 -m pip install -U git+https://github.com/pylast/pylast\n```\n\nOr from requirements.txt:\n\n```txt\n-e https://github.com/pylast/pylast.git#egg=pylast\n```\n\nNote:\n\n* pyLast 5.1+ supports Python 3.7-3.11.\n* pyLast 5.0+ supports Python 3.7-3.10.\n* pyLast 4.3+ supports Python 3.6-3.10.\n* pyLast 4.0 - 4.2 supports Python 3.6-3.9.\n* pyLast 3.2 - 3.3 supports Python 3.5-3.8.\n* pyLast 3.0 - 3.1 supports Python 3.5-3.7.\n* pyLast 2.2 - 2.4 supports Python 2.7.10+, 3.4-3.7.\n* pyLast 2.0 - 2.1 supports Python 2.7.10+, 3.4-3.6.\n* pyLast 1.7 - 1.9 supports Python 2.7, 3.3-3.6.\n* pyLast 1.0 - 1.6 supports Python 2.7, 3.3-3.4.\n* pyLast 0.5 supports Python 2, 3.\n* pyLast < 0.5 supports Python 2.\n\n## Features\n\n * Simple public interface.\n * Access to all the data exposed by the Last.fm web services.\n * Scrobbling support.\n * Full o bject-oriented design.\n * Proxy support.\n ! * Internal caching support for some web services calls (disabled by default).\n * Support for other API-compatible networks like Libre.fm.\n\n\n## Getting started\n\nHere\'s some simple code example to get you started. In order to create any object from\npyLast, you need a `Network` object which represents a social music network that is\nLast.fm or any other API-compatible one. You can obtain a pre-configured one for Last.fm\nand use it as follows:\n\n```python\nimport pylast\n\n# You have to have your own unique two values for API_KEY and API_SECRET\n# Obtain yours from https://www.last.fm/api/account/create for Last.fm\nAPI_KEY = "b25b959554ed76058ac220b7b2e0a026" # this is a sample key\nAPI_SECRET = "425b55975eed76058ac220b7b4e8a054"\n\n# In order to perform a write operation you need to authenticate yourself\nusername = "your_user_name"\npassword_hash = pylast.md5("your_password")\n\nnetwork = pylast.LastFMNetwork(\n api_key=API_KEY,\n api_secret=API_SECRET,\n username =username,\n password_hash=password_hash,\n)\n\n# Now you can use that object everywhere\ntrack = network.get_track("Iron Maiden", "The Nomad")\ntrack.love()\ntrack.add_tags(("awesome", "favorite"))\n\n# Type help(pylast.LastFMNetwork) or help(pylast) in a Python interpreter\n# to get more help about anything and see examples of how it works\n```\n\nMore examples in\nhugovk/lastfm-tools and\n[tests/](https://github.com/pylast/pylast/tree/main/tests).\n\n## Testing\n\nThe [tests/](https://github.com/pylast/pylast/tree/main/tests) directory contains\nintegration and unit tests with Last.fm, and plenty of code examples.\n\nFor integration tests you need a test account at Last.fm that will become cluttered with\ntest data, and an API key and secret. Either copy\n[example_test_pylast.yaml](example_test_pylast.yaml) to test_pylast.yaml and fill out\nthe credentials, or set them as environment variables like:\n\n```sh\nexport PYLAST_U SERNAME=TODO_ENTER_YOURS_HERE\nexport PYLAST! _PASSWORD! _HASH=TODO_ENTER_YOURS_HERE\nexport PYLAST_API_KEY=TODO_ENTER_YOURS_HERE\nexport PYLAST_API_SECRET=TODO_ENTER_YOURS_HERE\n```\n\nTo run all unit and integration tests:\n\n```sh\npython3 -m pip install -e ".[tests]"\npytest\n```\n\nOr run just one test case:\n\n```sh\npytest -k test_scrobble\n```\n\nTo run with coverage:\n\n```sh\npytest -v --cov pylast --cov-report term-missing\ncoverage report # for command-line report\ncoverage html # for HTML report\nopen htmlcov/index.html\n```\n\n## Logging\n\nTo enable from your own code:\n\n```python\nimport logging\nimport pylast\n\nlogging.basicConfig(level=logging.INFO)\n\n\nnetwork = pylast.LastFMNetwork(...)\n```\n\nTo enable from pytest:\n\n```sh\npytest --log-cli-level info -k test_album_search_images\n```\n\nTo also see data returned from the API, use `level=logging.DEBUG` or\n`--log-cli-level debug` instead.\n', + author_email='"Amr Hassan and Contributors" ', + maintainer='Hugo van Kemenade', + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', + 'Topic :: Internet', + 'Topic :: Multimedia :: Sound/Audio', + 'Topic :: Software Development :: Libraries :: Python Modules', + ], + install_requires=[ + 'httpx', + 'importlib-metadata; python_version < "3.8"', + ], + extras_require={ + 'tests': [ + 'flaky', + 'pytest', + 'pytest-cov', + 'pytest-random-order', + 'pyyaml', + ], + }, + packages=[ + 'pylast', + ], + package_dir={ + '': 'src', + }, +)