Skip to content

setup.py missing test_suite support #11

@eighthave

Description

@eighthave

The setup.py file does not include the test script. That is the standard interface for running the tests, and means that things that wrap setup.py will automatically run the tests. Such things include Debian packaging, pip, etc.

This patch adds test support while maintaining distutils compatibility:

diff --git a/setup.py b/setup.py
index 4bbca27..fc7eed2 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,7 @@
-from distutils.core import setup
+try:
+    from setuptools import setup
+except ImportError:
+    from distutils.core import setup

 from pgpdump import __version__, __author__

@@ -21,5 +24,6 @@ setup(
     url = 'https://github.com/toofishes/python-pgpdump',
     keywords = 'pgp gpg rfc2440 rfc4880 crypto cryptography',
     classifiers = classifiers,
-    packages = ['pgpdump']
+    packages = ['pgpdump'],
+    test_suite='pgpdump.test'
 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions