update setup.py
This commit is contained in:
parent
1529daac97
commit
fb8a7a2719
1 changed files with 133 additions and 146 deletions
17
setup.py
17
setup.py
|
@ -8,11 +8,7 @@ import glob
|
||||||
import codecs
|
import codecs
|
||||||
import re
|
import re
|
||||||
from distutils.command.build_ext import build_ext
|
from distutils.command.build_ext import build_ext
|
||||||
|
from distutils.core import setup, Extension
|
||||||
try:
|
|
||||||
from setuptools import setup, Extension
|
|
||||||
except ImportError:
|
|
||||||
from distutils.core import setup, Extension
|
|
||||||
|
|
||||||
have_cython = True
|
have_cython = True
|
||||||
try:
|
try:
|
||||||
|
@ -84,20 +80,11 @@ uchardet_sources = [
|
||||||
]
|
]
|
||||||
sources += uchardet_sources
|
sources += uchardet_sources
|
||||||
|
|
||||||
macros = []
|
|
||||||
extra_compile_args = []
|
|
||||||
extra_link_args = []
|
|
||||||
|
|
||||||
# Debug
|
|
||||||
# extra_compile_args.append('-g')
|
|
||||||
# extra_link_args.append('-g')
|
|
||||||
|
|
||||||
cchardet_module = Extension(
|
cchardet_module = Extension(
|
||||||
'cchardet._cchardet',
|
'cchardet._cchardet',
|
||||||
sources=sources,
|
sources=sources,
|
||||||
include_dirs=[uchardet_dir],
|
include_dirs=[uchardet_dir],
|
||||||
language='c++',
|
language='c++',
|
||||||
define_macros=macros,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def read(f):
|
def read(f):
|
||||||
|
@ -114,7 +101,7 @@ setup(
|
||||||
author='PyYoshi',
|
author='PyYoshi',
|
||||||
author_email='myoshi321go@gmail.com',
|
author_email='myoshi321go@gmail.com',
|
||||||
url=r'https://github.com/PyYoshi/cChardet',
|
url=r'https://github.com/PyYoshi/cChardet',
|
||||||
description='Universal encoding detector. This library is faster than chardet.',
|
description='cChardet is high speed universal character encoding detector.',
|
||||||
long_description='\n\n'.join((read('README.rst'), read('CHANGES.rst'))),
|
long_description='\n\n'.join((read('README.rst'), read('CHANGES.rst'))),
|
||||||
version=version,
|
version=version,
|
||||||
license='Mozilla Public License',
|
license='Mozilla Public License',
|
||||||
|
|
Loading…
Reference in a new issue