Skip to content

Commit

Permalink
Merge pull request #35 from nicolas-chaulet/bug/install
Browse files Browse the repository at this point in the history
Remove pyproject.toml
  • Loading branch information
nicolas-chaulet authored May 20, 2020
2 parents d5c27f6 + 8adc980 commit 16e2846
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
4 changes: 0 additions & 4 deletions pyproject.toml → .black.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,3 @@ exclude = '''
| dist
)/
'''

[build-system]
requires = ["setuptools>=41.0", "setuptools-scm", "wheel"]
build-backend = "setuptools.build_meta"
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repos:
hooks:
- id: black
language_version: python3.6
args: ["--config", ".black.toml"]
- repo: local
hooks:
- id: clang-format
Expand Down
25 changes: 17 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand All @@ -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:
Expand All @@ -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,
},
)
)

Expand All @@ -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",
Expand Down

0 comments on commit 16e2846

Please sign in to comment.