Skip to content

Commit b0e7b80

Browse files
committed
New requirements and setup.py cleanup
1 parent db9a02e commit b0e7b80

File tree

5 files changed

+67
-34
lines changed

5 files changed

+67
-34
lines changed

RELEASING.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@ python-blosc2 release procedure
33

44
Preliminaries
55
-------------
6+
* Make sure that the c-blosc2 submodule is updated to the latest version (or a specific version that
7+
will be documented in the `RELEASE_NOTES.md`)::
68

7-
* Make sure that the current master branch is passing the tests on Microsoft Azure.
9+
cd blosc2/c-blosc2
10+
git switch <desired branch or tag>
11+
cd -
12+
git commit -m "Update c-blosc2 sources" blosc2/c-blosc2
13+
git push
14+
15+
* Make sure that the current master branch is passing the tests in continuous integration.
816

9-
* Make sure that `RELEASE_NOTES.rst` and `ANNOUNCE.rst` are up to date with the latest news
17+
* Make sure that `RELEASE_NOTES.md` and `ANNOUNCE.rst` are up to date with the latest news
1018
in the release.
1119

1220
* Check that `VERSION` file contains the correct number.
@@ -43,7 +51,7 @@ Packaging
4351
re-clone and re-build::
4452

4553
cd /tmp
46-
git clone --recursive git@github.com:Blosc/python-blosc2.git
54+
git clone --recursive https://github.com/Blosc/python-blosc2.git
4755
cd python-blosc2
4856
python setup.py build_ext
4957

@@ -52,7 +60,7 @@ Packaging
5260
* Make the tarball with the command::
5361

5462
python setup.py sdist
55-
pip install dist/*
63+
pip install dist/blosc2-X.Y.Z.tar.gz
5664

5765
Do a quick check that the tarball is sane.
5866

@@ -88,7 +96,7 @@ Post-release actions
8896
cd $HOME/blosc/python-blosc2
8997

9098

91-
* Create new headers for adding new features in ``RELEASE_NOTES.rst``
99+
* Create new headers for adding new features in ``RELEASE_NOTES.md``
92100
add this place-holder:
93101

94102
XXX version-specific blurb XXX

requirements-doc.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sphinx
2+
pydata-sphinx-theme
3+
numpydoc

requirements-tests.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pytest~=6.2.2
2+
numpy~=1.20.1

requirements.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
pytest~=6.2.2
2-
numpy~=1.20.1
31
scikit-build>=0.11.1
42
cython>=0.29
5-
cmake>=3.14.0
6-
sphinx
7-
pydata-sphinx-theme
8-
numpydoc
3+
py-cpuinfo

setup.py

Lines changed: 48 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from __future__ import print_function
1010

1111
import os
12-
12+
from textwrap import dedent
1313
from skbuild import setup
1414

1515

@@ -20,7 +20,7 @@ def cmake_bool(cond):
2020
try:
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
3131
open('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+
author_email='[email protected]',
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

Comments
 (0)