diff --git a/pyproject.toml b/.black.toml similarity index 81% rename from pyproject.toml rename to .black.toml index aae7427..5ebe58e 100644 --- a/pyproject.toml +++ b/.black.toml @@ -23,7 +23,3 @@ exclude = ''' | dist )/ ''' - -[build-system] -requires = ["setuptools>=41.0", "setuptools-scm", "wheel"] -build-backend = "setuptools.build_meta" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 24426d9..7adfaff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,7 @@ repos: hooks: - id: black language_version: python3.6 + args: ["--config", ".black.toml"] - repo: local hooks: - id: clang-format diff --git a/setup.py b/setup.py index 7ba91ee..2284e3a 100644 --- a/setup.py +++ b/setup.py @@ -10,12 +10,13 @@ ) except: raise ModuleNotFoundError("Please install pytorch >= 1.1 before proceeding.") - + import glob from os import path + this_directory = path.abspath(path.dirname(__file__)) -with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: +with open(path.join(this_directory, "README.md"), encoding="utf-8") as f: long_description = f.read() @@ -27,7 +28,9 @@ def get_ext_modules(): extra_compile_args += ["-DVERSION_GE_1_3"] ext_src_root = "cuda" - ext_sources = glob.glob("{}/src/*.cpp".format(ext_src_root)) + glob.glob("{}/src/*.cu".format(ext_src_root)) + ext_sources = glob.glob("{}/src/*.cpp".format(ext_src_root)) + glob.glob( + "{}/src/*.cu".format(ext_src_root) + ) ext_modules = [] if CUDA_HOME: @@ -36,7 +39,10 @@ def get_ext_modules(): name="torch_points_kernels.points_cuda", sources=ext_sources, include_dirs=["{}/include".format(ext_src_root)], - extra_compile_args={"cxx": extra_compile_args, "nvcc": extra_compile_args,}, + extra_compile_args={ + "cxx": extra_compile_args, + "nvcc": extra_compile_args, + }, ) ) @@ -53,25 +59,28 @@ def get_ext_modules(): ) return ext_modules + def get_cmdclass(): return {"build_ext": BuildExtension} + requirements = ["torch>=1.1.0"] -url = 'https://github.com/nicolas-chaulet/torch-points-kernels' -__version__="0.6.2" +url = "https://github.com/nicolas-chaulet/torch-points-kernels" +__version__ = "0.6.3" setup( name="torch-points-kernels", version=__version__, author="Nicolas Chaulet", packages=find_packages(), + description="PyTorch kernels for spatial operations on point clouds", url=url, - download_url='{}/archive/{}.tar.gz'.format(url, __version__), + download_url="{}/archive/{}.tar.gz".format(url, __version__), install_requires=requirements, ext_modules=get_ext_modules(), cmdclass=get_cmdclass(), long_description=long_description, - long_description_content_type='text/markdown', + long_description_content_type="text/markdown", classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License",