diff --git a/pyproject.toml b/pyproject.toml index 272c55cab554df5413914dd423bf24e1b1e0bf9d..48a9415d02af254413a907623d9f759cdcc00ab1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,11 @@ build-backend = "setuptools.build_meta" ##################################################### # SETUPTOOLS [tool.setuptools] -##################################################### +[tool.setuptools.packages.find] +where = ["."] # list of folders that contain the packages (["."] by default) +include = ["aidge_core*"] # package names should match these glob patterns (["*"] by default) +exclude = ["aidge_core.unit_tests*"] # exclude packages matching these glob patterns (empty by default) +namespaces = false # to disable scanning PEP 420 namespaces (true by default) # SETUPTOOLS_SCM [tool.setuptools_scm] write_to = "aidge_core/_version.py" diff --git a/setup.py b/setup.py index 5b2c15709c7b80487a1f68716aad5f1601cece7a..370f72a6e19c45dce9291ae9ff1c276bf9695ec5 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,6 @@ from math import ceil import toml from setuptools import setup, Extension -from setuptools import find_packages from setuptools.command.build_ext import build_ext def get_project_name() -> str: @@ -21,7 +20,6 @@ def get_project_name() -> str: return project_toml["project"]["name"] - class CMakeExtension(Extension): def __init__(self, name): super().__init__(name, sources=[]) @@ -98,9 +96,7 @@ class CMakeBuild(build_ext): if __name__ == "__main__": - setup( - packages=find_packages(where="."), include_package_data=True, ext_modules=[CMakeExtension(get_project_name())], cmdclass={