aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-03-21 18:45:46 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-03-21 19:21:08 +0000
commit76c9d7fce137d667d8ab25fc3d8a9aa3b6c98465 (patch)
treeb93bb79342b9017709ef1494d8df1a1988b71611
parentb28ce2b070b5d87efee192c2c7bf641ddcef0d76 (diff)
devel/py-userpath: Convert to USE_PYTHON=pep517
- Bump PORTREVISION for dependency and package change
-rw-r--r--devel/py-userpath/Makefile9
-rw-r--r--devel/py-userpath/files/setup.py33
2 files changed, 3 insertions, 39 deletions
diff --git a/devel/py-userpath/Makefile b/devel/py-userpath/Makefile
index 24f9b175e2d1..e89c0db1e1fa 100644
--- a/devel/py-userpath/Makefile
+++ b/devel/py-userpath/Makefile
@@ -1,6 +1,6 @@
PORTNAME= userpath
PORTVERSION= 1.8.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,15 +12,12 @@ WWW= https://github.com/ofek/userpath
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click>=0:devel/py-click@${PY_FLAVOR}
USES= python:3.7+
-USE_PYTHON= autoplist concurrent distutils
+USE_PYTHON= autoplist concurrent pep517
NO_ARCH= yes
-post-patch:
- @${RM} ${WRKSRC}/pyproject.toml
- @${CP} ${FILESDIR}/setup.py ${WRKSRC}/
-
.include <bsd.port.mk>
diff --git a/devel/py-userpath/files/setup.py b/devel/py-userpath/files/setup.py
deleted file mode 100644
index 0b964e937fb9..000000000000
--- a/devel/py-userpath/files/setup.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-from setuptools import setup
-
-setup(
- name='userpath',
- version='1.8.0',
- description='Cross-platform tool for adding locations to the user PATH',
- long_description="# userpath\n\n| | |\n| --- | --- |\n| CI/CD | [![CI - Test](https://github.com/ofek/userpath/actions/workflows/test.yml/badge.svg)](https://github.com/ofek/userpath/actions/workflows/test.yml) [![CD - Build](https://github.com/ofek/userpath/actions/workflows/build.yml/badge.svg)](https://github.com/ofek/userpath/actions/workflows/build.yml) |\n| Package | [![PyPI - Version](https://img.shields.io/pypi/v/userpath.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/userpath/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/userpath.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/userpath/) |\n| Meta | [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) [![GitHub Sponsors](https://img.shields.io/github/sponsors/ofek?logo=GitHub%20Sponsors&style=social)](https://github.com/sponsors/ofek) |\n\n-----\n\nThis is a tool for modifying a user's `PATH`.\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [CLI](#cli)\n- [API](#api)\n- [License](#license)\n\n## Installation\n\n```console\npip install userpath\n```\n\n## CLI\n\n```console\n$ userpath -h\nUsage: userpath [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n --version Show the version and exit.\n -h, --help Show this message and exit.\n\nCommands:\n append Appends to the user PATH\n prepend Prepends to the user PATH\n verify Checks if locations are in the user PATH\n```\n\n## API\n\n```pycon\n>>> import userpath\n>>> location = r'C:\\Users\\Ofek\\Desktop\\test'\n>>>\n>>> userpath.in_current_path(location)\nFalse\n>>> userpath.in_new_path(location)\nFalse\n>>> userpath.append(location)\nTrue\n>>> userpath.in_new_path(location)\nTrue\n>>> userpath.need_shell_restart(location)\nTrue\n```\n\n## License\n\n`userpath` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
- author_email='Ofek Lev <oss@ofek.dev>',
- classifiers=[
- 'Development Status :: 4 - Beta',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: MIT License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python :: 3.10',
- 'Programming Language :: Python :: 3.7',
- 'Programming Language :: Python :: 3.8',
- 'Programming Language :: Python :: 3.9',
- 'Programming Language :: Python :: Implementation :: CPython',
- 'Programming Language :: Python :: Implementation :: PyPy',
- ],
- install_requires=[
- 'click',
- ],
- entry_points={
- 'console_scripts': [
- 'userpath = userpath.cli:userpath',
- ],
- },
- packages=[
- 'userpath',
- ],
-)