Skip to content

Commit

Permalink
misc/py-shell-gpt: switch to better way to avoid installation of test…
Browse files Browse the repository at this point in the history
… files

PR:		270542
Reported by:	John Hein <[email protected]>
  • Loading branch information
John Hein authored and tagattie committed Apr 3, 2023
1 parent 126af20 commit 52b0843
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
8 changes: 1 addition & 7 deletions misc/py-shell-gpt/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PORTNAME= shell-gpt
DISTVERSION= 0.8.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= misc python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -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
Expand Down
11 changes: 11 additions & 0 deletions misc/py-shell-gpt/files/patch-setup.py
Original file line number Diff line number Diff line change
@@ -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",
10 changes: 0 additions & 10 deletions misc/py-shell-gpt/files/patch-shell__gpt.egg-info_SOURCES.txt

This file was deleted.

0 comments on commit 52b0843

Please sign in to comment.