summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Geier <Matthias.Geier@gmail.com>2017-10-11 11:13:45 +0200
committerMatthias Geier <Matthias.Geier@gmail.com>2017-10-21 10:01:47 +0200
commit6e1d71547558159d492c944c55bdd57801fc0da7 (patch)
tree8e07acf8bc07c5194a44d4d6f4d1caa63a074569
parentec37ef5ced1cb1a4dcae125ec68e7506dfbcf3f0 (diff)
Move sounddevice.py to src/
-rw-r--r--doc/conf.py2
-rw-r--r--setup.py7
-rw-r--r--src/sounddevice.py (renamed from sounddevice.py)0
3 files changed, 6 insertions, 3 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 8c2d75e..a730f22 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -19,7 +19,7 @@ from subprocess import check_output
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath('..'))
+sys.path.insert(0, os.path.abspath('../src'))
sys.path.insert(0, os.path.abspath('.'))
# Fake import to avoid actually loading CFFI and the PortAudio library
diff --git a/setup.py b/setup.py
index 9bfc759..7af08ee 100644
--- a/setup.py
+++ b/setup.py
@@ -2,10 +2,11 @@ import os
import platform
from setuptools import setup
-__version__ = 'unknown'
+package_dir = {'': 'src'}
# "import" __version__
-for line in open('sounddevice.py'):
+__version__ = 'unknown'
+for line in open(os.path.join('src', 'sounddevice.py')):
if line.startswith('__version__'):
exec(line)
break
@@ -35,6 +36,7 @@ else:
if libname and os.path.isdir('_sounddevice_data'):
packages = ['_sounddevice_data']
package_data = {'_sounddevice_data': [libname, 'README.md']}
+ package_dir['_sounddevice_data'] = '_sounddevice_data'
zip_safe = False
else:
packages = None
@@ -67,6 +69,7 @@ else:
setup(
name='sounddevice',
version=__version__,
+ package_dir=package_dir,
py_modules=['sounddevice'],
packages=packages,
package_data=package_data,
diff --git a/sounddevice.py b/src/sounddevice.py
index 4ada5f6..4ada5f6 100644
--- a/sounddevice.py
+++ b/src/sounddevice.py