git: 52b0843d3594 - main - misc/py-shell-gpt: switch to better way to avoid installation of test files
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 03 Apr 2023 09:18:49 UTC
The branch main has been updated by tagattie:
URL: https://cgit.FreeBSD.org/ports/commit/?id=52b0843d3594f81fb2f755c25529ef33e75aa7e0
commit 52b0843d3594f81fb2f755c25529ef33e75aa7e0
Author: John Hein <jcfyecrayz@liamekaens.com>
AuthorDate: 2023-04-03 09:17:03 +0000
Commit: Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2023-04-03 09:18:33 +0000
misc/py-shell-gpt: switch to better way to avoid installation of test files
PR: 270542
Reported by: John Hein <jcfyecrayz@liamekaens.com>
---
misc/py-shell-gpt/Makefile | 8 +-------
misc/py-shell-gpt/files/patch-setup.py | 11 +++++++++++
misc/py-shell-gpt/files/patch-shell__gpt.egg-info_SOURCES.txt | 10 ----------
3 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/misc/py-shell-gpt/Makefile b/misc/py-shell-gpt/Makefile
index 0032fccf71d5..2eaf32bf0a7a 100644
--- a/misc/py-shell-gpt/Makefile
+++ b/misc/py-shell-gpt/Makefile
@@ -1,6 +1,6 @@
PORTNAME= shell-gpt
DISTVERSION= 0.8.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= misc python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -25,12 +25,6 @@ USE_PYTHON= autoplist distutils pytest
BINARY_ALIAS= python=${PYTHON_CMD}
NO_ARCH= yes
-post-extract:
- @${RM} ${WRKSRC}/tests/__init__.py
-
-post-patch:
- @${FIND} ${WRKSRC} -type f -name '*.orig' -delete
-
do-test:
cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest tests/unittests.py
cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest tests/integrational_tests.py
diff --git a/misc/py-shell-gpt/files/patch-setup.py b/misc/py-shell-gpt/files/patch-setup.py
new file mode 100644
index 000000000000..a19ad8d57d5e
--- /dev/null
+++ b/misc/py-shell-gpt/files/patch-setup.py
@@ -0,0 +1,11 @@
+--- setup.py.orig 2023-04-03 09:02:01 UTC
++++ setup.py
+@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
+ setup(
+ name="shell_gpt",
+ version="0.8.1",
+- packages=find_packages(),
++ packages=find_packages(exclude=['tests']),
+ install_requires=[
+ "typer~=0.7.0",
+ "requests~=2.28.2",
diff --git a/misc/py-shell-gpt/files/patch-shell__gpt.egg-info_SOURCES.txt b/misc/py-shell-gpt/files/patch-shell__gpt.egg-info_SOURCES.txt
deleted file mode 100644
index 8afe86591b47..000000000000
--- a/misc/py-shell-gpt/files/patch-shell__gpt.egg-info_SOURCES.txt
+++ /dev/null
@@ -1,10 +0,0 @@
---- shell_gpt.egg-info/SOURCES.txt.orig 2023-04-02 05:52:27 UTC
-+++ shell_gpt.egg-info/SOURCES.txt
-@@ -15,6 +15,3 @@ shell_gpt.egg-info/dependency_links.txt
- shell_gpt.egg-info/entry_points.txt
- shell_gpt.egg-info/requires.txt
- shell_gpt.egg-info/top_level.txt
--tests/__init__.py
--tests/integrational_tests.py
--tests/unittests.py
-\ No newline at end of file