Skip to content

Commit

Permalink
Issue #52: Fix package and module name, enabling them to be different.
Browse files Browse the repository at this point in the history
  • Loading branch information
MattClarkson committed Feb 23, 2019
1 parent 154c48d commit bdada33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
long_description = f.read()

# Get the top-level folder name of this project.
dir_path = os.path.dirname(os.path.normpath(__file__))
dir_path = os.path.dirname(os.path.abspath(__file__))
dir_name = os.path.split(dir_path)[1]


Expand All @@ -63,9 +63,9 @@ def run(self):
self.build_extension(ext)

def build_extension(self, ext):
ext_dir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name)))
ext_dir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(self.distribution.get_name())))
cmake_args = ['-DMYPROJECT_PYTHON_OUTPUT_DIRECTORY:PATH=' + ext_dir,
'-DMYPROJECT_PYTHON_MODULE_NAME:STRING=' + self.distribution.get_name()
'-DMYPROJECT_PYTHON_MODULE_NAME:STRING=' + ext.name
]
build_args = []

Expand Down Expand Up @@ -103,7 +103,7 @@ def build_extension(self, ext):
description='A template project, to enable people to build nicely structured C++ projects.',
long_description=long_description,
long_description_content_type='text/markdown',
ext_modules=[CMakeExtension(str('CMakeCatchTemplate') + 'Python', dir_path)],
ext_modules=[CMakeExtension(str('CMakeCatchTemplate') + 'Python', sourcedir=dir_path)],
cmdclass=dict(build_ext=CMakeBuild),
zip_safe=False,
license='BSD-3 license',
Expand Down

0 comments on commit bdada33

Please sign in to comment.