Skip to content

Commit

Permalink
fixed running setup.py on newer python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dvida committed Mar 15, 2024
1 parent 2847642 commit 5bb5d7a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@

from Cython.Build import cythonize

# Determine find_packages function to use depending on Python version
find_packages_func = find_packages

# If in Python 3.3 or later, load find_namespace_packages()
if sys.version_info >= (3, 3):
from setuptools import find_namespace_packages
find_packages_func = find_namespace_packages


kht_module = Extension("kht_module",
sources = ["Native/Hough/kht.cpp",
Expand Down Expand Up @@ -79,7 +87,7 @@
install_requires=requirements,
data_files=[('Catalogs', catalog_files), ('share', share_files)],
ext_modules = [kht_module] + cythonize(cython_modules),
packages=find_packages(),
packages=find_packages_func(),
include_package_data=True,
include_dirs=[numpy.get_include()]
)

0 comments on commit 5bb5d7a

Please sign in to comment.