99from __future__ import print_function
1010
1111import os
12-
12+ from textwrap import dedent
1313from skbuild import setup
1414
1515
@@ -20,7 +20,7 @@ def cmake_bool(cond):
2020try :
2121 import cpuinfo
2222 cpu_info = cpuinfo .get_cpu_info ()
23- except Exception :
23+ except :
2424 # newer cpuinfo versions fail to import on unsupported architectures
2525 cpu_info = None
2626
@@ -30,25 +30,50 @@ def cmake_bool(cond):
3030# Create the version.py file
3131open ('blosc2/version.py' , 'w' ).write ('__version__ = "%s"\n ' % VERSION )
3232
33+ classifiers = dedent ("""\
34+ Development Status :: 3 - Alpha
35+ Intended Audience :: Developers
36+ Intended Audience :: Information Technology
37+ Intended Audience :: Science/Research
38+ License :: OSI Approved :: BSD License
39+ Programming Language :: Python
40+ Topic :: Software Development :: Libraries :: Python Modules
41+ Operating System :: Microsoft :: Windows
42+ Operating System :: Unix
43+ Programming Language :: Python :: 3
44+ Programming Language :: Python :: 3.6
45+ Programming Language :: Python :: 3.7
46+ Programming Language :: Python :: 3.8
47+ """ )
3348
34- setup (name = "blosc2" ,
35- setup_requires = [
36- 'cython>=0.29' ,
37- 'scikit-build' ,
38- 'pytest>=3.4.2'
39- ],
40- cmake_args = [
41- '-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool (
42- ('DISABLE_BLOSC_SSE2' in os .environ ) or (cpu_info is None ) or ('sse2' not in cpu_info ['flags' ])),
43- '-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool (
44- ('DISABLE_BLOSC_AVX2' in os .environ ) or (cpu_info is None ) or ('avx2' not in cpu_info ['flags' ])),
45- '-DDEACTIVATE_LZ4:BOOL=%s' % cmake_bool (not int (os .environ .get ('INCLUDE_LZ4' , '1' ))),
46- # Snappy is disabled by default
47- '-DDEACTIVATE_SNAPPY:BOOL=%s' % cmake_bool (not int (os .environ .get ('INCLUDE_SNAPPY' , '0' ))),
48- '-DDEACTIVATE_ZLIB:BOOL=%s' % cmake_bool (not int (os .environ .get ('INCLUDE_ZLIB' , '1' ))),
49- '-DDEACTIVATE_ZSTD:BOOL=%s' % cmake_bool (not int (os .environ .get ('INCLUDE_ZSTD' , '1' ))),
50- ],
51- tests_require = ['numpy' , 'psutil' ],
52- packages = ['blosc2' ],
53- package_dir = {'blosc2' : 'blosc2' },
54- )
49+ setup (
50+ name = "blosc2" ,
51+ version = VERSION ,
52+ description = 'Python wrapper for the C-Blosc2 library.' ,
53+ long_description = None ,
54+ classifiers = [c for c in classifiers .split ("\n " ) if c ],
55+ author = 'Blosc Development Team' ,
56+ 57+ maintainer = 'Blosc Development Team' ,
58+ maintainer_email = '[email protected] ' ,
59+ url = 'https://github.com/Blosc/cat4py' ,
60+ license = 'https://opensource.org/licenses/BSD-3-Clause' ,
61+ platforms = ['any' ],
62+ setup_requires = [
63+ 'cython>=0.29' ,
64+ 'scikit-build' ,
65+ 'py-cpuinfo'
66+ ],
67+ cmake_args = [
68+ '-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool (
69+ ('DISABLE_BLOSC_SSE2' in os .environ ) or (cpu_info is None ) or ('sse2' not in cpu_info ['flags' ])),
70+ '-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool (
71+ ('DISABLE_BLOSC_AVX2' in os .environ ) or (cpu_info is None ) or ('avx2' not in cpu_info ['flags' ])),
72+ '-DDEACTIVATE_LZ4:BOOL=%s' % cmake_bool (not int (os .environ .get ('INCLUDE_LZ4' , '1' ))),
73+ '-DDEACTIVATE_ZLIB:BOOL=%s' % cmake_bool (not int (os .environ .get ('INCLUDE_ZLIB' , '1' ))),
74+ '-DDEACTIVATE_ZSTD:BOOL=%s' % cmake_bool (not int (os .environ .get ('INCLUDE_ZSTD' , '1' ))),
75+ ],
76+ tests_require = ['numpy' , 'psutil' ],
77+ packages = ['blosc2' ],
78+ package_dir = {'blosc2' : 'blosc2' },
79+ )
0 commit comments