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