Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
yysijie committed Jan 15, 2020
1 parent 256ae8e commit 12a3dce
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
1 change: 0 additions & 1 deletion doc/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[Option] **Create** a conda virtual environment and activate it:

``` shell
pip install conda
conda create -n open-mmlab python=3.7 -y
conda activate open-mmlab
```
Expand Down
32 changes: 17 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import platform
import subprocess
import time

from setuptools import find_packages, setup, Extension, dist
dist.Distribution().fetch_build_eggs(['Cython', 'numpy>=1.11.1'])
import numpy as np
from setuptools import find_packages, setup, Extension
# from Cython.Build import cythonize # noqa: E402
from Cython.Build import cythonize # noqa: E402

sys.path.append('./src')
from nms.setup_linux import custom_build_ext, CUDA
Expand Down Expand Up @@ -96,19 +98,19 @@ def get_requirements(filename='requirements.txt'):
return requires


# def make_cython_ext(name, module, sources):
# extra_compile_args = None
# if platform.system() != 'Windows':
# extra_compile_args = {
# 'cxx': ['-Wno-unused-function', '-Wno-write-strings']
# }
# extension = Extension('{}.{}'.format(
# module, name), [os.path.join(*module.split('.'), p) for p in sources],
# include_dirs=[np.get_include()],
# language='c++',
# extra_compile_args=extra_compile_args)
# extension, = cythonize(extension)
# return extension
def make_cython_ext(name, module, sources):
extra_compile_args = None
if platform.system() != 'Windows':
extra_compile_args = {
'cxx': ['-Wno-unused-function', '-Wno-write-strings']
}
extension = Extension('{}.{}'.format(
module, name), [os.path.join(*module.split('.'), p) for p in sources],
include_dirs=[np.get_include()],
language='c++',
extra_compile_args=extra_compile_args)
extension, = cythonize(extension)
return extension


if __name__ == '__main__':
Expand Down

0 comments on commit 12a3dce

Please sign in to comment.