Skip to content

Commit b96bc1d

Browse files
committed
Move confluent_kafka/ to src/ to avoid pytest/tox picking up the local dir
.. rather than the installed module. Should once and for all eliminate the "ImportError: .. confluent_kafka.cimpl" problems.
1 parent 69ec887 commit b96bc1d

37 files changed

+4
-3
lines changed

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include README.md
22
include LICENSE.txt
33
include test-requirements.txt
4-
include confluent_kafka/src/*.[ch]
4+
include src/confluent_kafka/src/*.[ch]

setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import platform
77

88
work_dir = os.path.dirname(os.path.realpath(__file__))
9-
mod_dir = os.path.join(work_dir, 'confluent_kafka')
9+
mod_dir = os.path.join(work_dir, 'src', 'confluent_kafka')
1010
ext_dir = os.path.join(mod_dir, 'src')
1111

1212
INSTALL_REQUIRES = [
@@ -70,7 +70,8 @@ def get_install_requirements(path):
7070
author_email='[email protected]',
7171
url='https://github.com/confluentinc/confluent-kafka-python',
7272
ext_modules=[module],
73-
packages=find_packages(exclude=("tests", "tests.*")),
73+
packages=find_packages('src'),
74+
package_dir={'': 'src'},
7475
data_files=[('', [os.path.join(work_dir, 'LICENSE.txt')])],
7576
install_requires=INSTALL_REQUIRES,
7677
extras_require={
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)