Blame 0002-Fix-62-add-pyprinttags-to-py_modules.patch

f94e15d
From 28772f6f94d37f05728071381a0fa04c6a14783a Mon Sep 17 00:00:00 2001
f94e15d
From: Michael Helmling <michaelhelmling@posteo.de>
f94e15d
Date: Sat, 6 Jul 2019 10:46:03 +0200
f94e15d
Subject: [PATCH 2/2] Fix #62: add pyprinttags to py_modules
f94e15d
f94e15d
---
f94e15d
 setup.py                        | 14 ++++++++------
f94e15d
 tests/test_finds_pyprinttags.py |  2 ++
f94e15d
 2 files changed, 10 insertions(+), 6 deletions(-)
f94e15d
 create mode 100644 tests/test_finds_pyprinttags.py
f94e15d
f94e15d
diff --git a/setup.py b/setup.py
f94e15d
index a1ed9e9..c46ec2a 100644
f94e15d
--- a/setup.py
f94e15d
+++ b/setup.py
f94e15d
@@ -10,7 +10,7 @@
f94e15d
 
f94e15d
 import io, os, os.path, sys
f94e15d
 import re
f94e15d
-from setuptools import setup, find_packages
f94e15d
+from setuptools import setup
f94e15d
 from distutils.extension import Extension
f94e15d
 
f94e15d
 CLASSIFIERS = [
f94e15d
@@ -51,6 +51,7 @@ else:
f94e15d
 
f94e15d
 if '--cython' in sys.argv or is_windows:
f94e15d
     from Cython.Build import cythonize
f94e15d
+
f94e15d
     print('cythonizing taglib.pyx ...')
f94e15d
     extensions = cythonize([Extension('taglib', [os.path.join('src', 'taglib.pyx')], **kwargs)])
f94e15d
     sys.argv = [arg for arg in sys.argv if arg != '--cython']
f94e15d
@@ -76,9 +77,10 @@ setup(
f94e15d
     author_email='michaelhelmling@posteo.de',
f94e15d
     url='http://github.com/supermihi/pytaglib',
f94e15d
     ext_modules=extensions,
f94e15d
-    packages=find_packages(exclude=['tests']),
f94e15d
-    entry_points={'console_scripts': ['{0} = pyprinttags:script'.format(script_name)]},
f94e15d
-    setup_requires=['pytest-runner'],
f94e15d
-    test_suite='tests',
f94e15d
-    tests_require=['pytest']
f94e15d
+    package_dir={'': 'src'},
f94e15d
+    py_modules=['pytaglib', 'pyprinttags'],
f94e15d
+    entry_points={'console_scripts': ['{0}=pyprinttags:script'.format(script_name)]},
f94e15d
+    extras_require={
f94e15d
+        'test': ['pytest-runner', 'pytest']
f94e15d
+    }
f94e15d
 )
f94e15d
diff --git a/tests/test_finds_pyprinttags.py b/tests/test_finds_pyprinttags.py
f94e15d
new file mode 100644
f94e15d
index 0000000..8463df7
f94e15d
--- /dev/null
f94e15d
+++ b/tests/test_finds_pyprinttags.py
f94e15d
@@ -0,0 +1,2 @@
f94e15d
+def test_import_pyprinttags():
f94e15d
+    import pyprinttags
f94e15d
\ No newline at end of file
f94e15d
-- 
f94e15d
2.22.0
f94e15d