Skip to content

Commit

Permalink
Move confluent_kafka/ to src/ to avoid pytest/tox picking up the loca…
Browse files Browse the repository at this point in the history
…l dir

.. rather than the installed module.

Should once and for all eliminate the "ImportError: .. confluent_kafka.cimpl"
problems.
  • Loading branch information
edenhill committed Oct 26, 2020
1 parent 69ec887 commit b96bc1d
Show file tree
Hide file tree
Showing 37 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include README.md
include LICENSE.txt
include test-requirements.txt
include confluent_kafka/src/*.[ch]
include src/confluent_kafka/src/*.[ch]
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import platform

work_dir = os.path.dirname(os.path.realpath(__file__))
mod_dir = os.path.join(work_dir, 'confluent_kafka')
mod_dir = os.path.join(work_dir, 'src', 'confluent_kafka')
ext_dir = os.path.join(mod_dir, 'src')

INSTALL_REQUIRES = [
Expand Down Expand Up @@ -70,7 +70,8 @@ def get_install_requirements(path):
author_email='[email protected]',
url='https://github.com/confluentinc/confluent-kafka-python',
ext_modules=[module],
packages=find_packages(exclude=("tests", "tests.*")),
packages=find_packages('src'),
package_dir={'': 'src'},
data_files=[('', [os.path.join(work_dir, 'LICENSE.txt')])],
install_requires=INSTALL_REQUIRES,
extras_require={
Expand Down
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.
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b96bc1d

Please sign in to comment.