Update py-vulture to 2.3.
This commit is contained in:
parent
2be4d64366
commit
f214b3564b
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2020/08/29 20:26:08 martin Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2021/04/29 13:54:37 martin Exp $
|
||||
|
||||
COMMENT = finds unused code in Python programs
|
||||
|
||||
MODPY_EGG_VERSION = 2.1
|
||||
MODPY_EGG_VERSION = 2.3
|
||||
|
||||
DISTNAME = vulture-${MODPY_EGG_VERSION}
|
||||
PKGNAME = py-${DISTNAME}
|
||||
@ -20,6 +20,7 @@ MODULES = lang/python
|
||||
|
||||
MODPY_PI = Yes
|
||||
MODPY_SETUPTOOLS = Yes
|
||||
MODPY_PYTEST = Yes
|
||||
|
||||
FLAVORS = python3
|
||||
FLAVOR = python3
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (vulture-2.1.tar.gz) = kzv384SOnjnsq2oS+qWdUYVHHIh1NKusE7rqb+gTjMI=
|
||||
SIZE (vulture-2.1.tar.gz) = 42300
|
||||
SHA256 (vulture-2.3.tar.gz) = A9WmK8vpzrmpsFdfQtcaLUFAcCKfLm+V+m58caqu2Wc=
|
||||
SIZE (vulture-2.3.tar.gz) = 51630
|
||||
|
@ -1,48 +0,0 @@
|
||||
$OpenBSD: patch-setup_py,v 1.1 2020/08/29 20:26:08 martin Exp $
|
||||
|
||||
Index: setup.py
|
||||
--- setup.py.orig
|
||||
+++ setup.py
|
||||
@@ -3,10 +3,11 @@
|
||||
import codecs
|
||||
import os.path
|
||||
import re
|
||||
+import sys
|
||||
|
||||
import setuptools
|
||||
+from setuptools.command.test import test as TestCommand
|
||||
|
||||
-
|
||||
def read(*parts):
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
with codecs.open(os.path.join(here, *parts), "r") as f:
|
||||
@@ -22,7 +23,20 @@ def find_version(*file_parts):
|
||||
return version_match.group(1)
|
||||
raise RuntimeError("Unable to find version string.")
|
||||
|
||||
+class PyTest(TestCommand):
|
||||
+ def finalize_options(self):
|
||||
+ TestCommand.finalize_options(self)
|
||||
+
|
||||
+ self.test_args = []
|
||||
+ self.test_suite = True
|
||||
|
||||
+ def run_tests(self):
|
||||
+ # import here, cause outside the eggs aren't loaded
|
||||
+ import pytest
|
||||
+
|
||||
+ sys.exit(pytest.main(self.test_args))
|
||||
+
|
||||
+
|
||||
with open("README.md") as f1, open("CHANGELOG.md") as f2:
|
||||
long_description = f1.read() + "\n\n" + f2.read()
|
||||
|
||||
@@ -54,6 +68,8 @@ setuptools.setup(
|
||||
install_requires=["toml"],
|
||||
entry_points={"console_scripts": ["vulture = vulture.core:main"]},
|
||||
python_requires=">=3.6",
|
||||
+ tests_require=["pytest", "pytest-cov"],
|
||||
+ cmdclass={"test": PyTest},
|
||||
packages=setuptools.find_packages(exclude=["tests"]),
|
||||
package_data={"vulture": ["whitelists/*.py"]},
|
||||
)
|
Loading…
Reference in New Issue
Block a user