Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mschrader15 authored Oct 2, 2024
1 parent 4bb0a9d commit d055b43
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,28 @@ def build_extension(self, ext: CMakeExtension) -> None:
)


# The information here can also be placed in setup.cfg - better separation of
# logic and declaration, and simpler if you include description/version in a file.
setup(
name="sumo-pipelines",
version="1.1.6",
author="Max Schrader",
author_email="mschrader15@gmail.com",
packages=find_packages(),
install_requires=read_requirements(),
ext_modules=[CMakeExtension("_sumo_pipelines")],
cmdclass={"build_ext": CMakeBuild},
zip_safe=False,
extras_require={"test": ["pytest>=6.0"]},
package_data={'sumo_pipelines': ['*.yaml']}
)
def setup_package():
ext_modules = []
cmdclass = {}

# Only add C++ extension if explicitly requested
if os.environ.get('BUILD_CPP', '').lower() in ('1', 'true', 'yes', 'on'):
ext_modules = [CMakeExtension("_sumo_pipelines")]
cmdclass = {"build_ext": CMakeBuild}

setup(
name="sumo-pipelines",
version="1.1.6",
author="Max Schrader",
author_email="mschrader15@gmail.com",
packages=find_packages(),
install_requires=read_requirements(),
ext_modules=ext_modules, # Changed from cmake_modules to ext_modules
cmdclass=cmdclass,
zip_safe=False,
extras_require={"test": ["pytest>=6.0"]},
package_data={'sumo_pipelines': ['*.yaml']}
)

if __name__ == "__main__":
setup_package()

0 comments on commit d055b43

Please sign in to comment.