Skip to content

Commit

Permalink
Merge pull request #98 from pauldmccarthy/mnt/no-compile-numpy
Browse files Browse the repository at this point in the history
Mnt/no compile numpy
  • Loading branch information
pauldmccarthy authored Apr 14, 2022
2 parents e8b6c15 + 6ffcd3d commit 61b8e0e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 24 deletions.
26 changes: 16 additions & 10 deletions .ci/build_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

set -e

# Make sure cython is available on all platforms
# Numpy is required to build the test modules
export CIBW_BEFORE_BUILD="pip install cython numpy"

# Make sure zlib headers are available on linux
export CIBW_BEFORE_ALL_LINUX="yum install -y zlib-devel || apt-get install -y zlib1g-dev || apk add zlib-dev || true"

Expand All @@ -16,15 +12,26 @@ export CIBW_ENVIRONMENT_WINDOWS="ZLIB_HOME='$ZLIB_HOME'"
# Run quick test suite on built wheels.
export CIBW_TEST_REQUIRES="cython pytest numpy nibabel"

# Disable pypy builds
export CIBW_SKIP="pp*"
# Disable pypy builds (reasons for doing this have been lost to
# history [GHA logs of failing builds deleted]).
#
# Disable musllinux builds until numpy binaries are available (as
# compiling numpy takes too long, and causes GHA jobs to time out).
export CIBW_SKIP="pp* *musllinux*"

# Skip i686/aarch64 tests - I have experienced hangs on these
# platforms, which I traced to a trivial numpy operation -
# "numpy.linalg.det(numpy.eye(3))". This occurs when numpy has
# to be compiled from source during the build, so can be
# re-visited if/when numpy is avaialble on all platforms.
export CIBW_TEST_SKIP="*i686* *aarch64*"

# Pytest makes it *very* awkward to run tests
# from an installed package, and still find/
# interpret a conftest.py file correctly.
echo '#!/usr/bin/env bash' > testcmd
echo 'cp $1/setup.cfg .' >> testcmd
echo 'python -m indexed_gzip.tests -c setup.cfg -m "not slow_test"' >> testcmd
echo '#!/usr/bin/env bash' > testcmd
echo 'cp $1/pyproject.toml .' >> testcmd
echo 'python -m indexed_gzip.tests -c pyproject.toml -m "not slow_test"' >> testcmd
chmod a+x testcmd

export CIBW_TEST_COMMAND="bash {project}/testcmd {project}"
Expand All @@ -34,7 +41,6 @@ export CIBW_TEST_COMMAND="bash {project}/testcmd {project}"
python -m pip install cibuildwheel
python -m cibuildwheel --output-dir ./dist


# Disable py27 builds on windows
export CIBW_BUILD="cp27-mac* cp27-*linux*"
python -m pip install cibuildwheel==1.*
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# `indexed_gzip` changelog


## 1.6.11 (April 13th 2022)
## 1.6.12 (April 14th 2022)


* Changed the default read buffer size used by the `IndexedGzipFile` class
(#90).
* Update to wheel building procedure (#92,#93,#95,#96,#97).
* Update to wheel building procedure (#92,#93,#95,#96,#97,#98).
* Aded `pyproject.toml` to declare build-time requirements (#94).


Expand Down
2 changes: 1 addition & 1 deletion indexed_gzip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"""


__version__ = '1.6.11'
__version__ = '1.6.12'
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
[build-system]
requires = ["setuptools >= 40.8.0", "wheel", "cython", "numpy"]

[tool.pytest.ini_options]
testpaths = [
"indexed_gzip/tests"
]
addopts = "-v"
markers = [
"zran_test: Test the zran.c library",
"indexed_gzip_test: Test the indexed_gzip library",
"nibabel_test: Test interaction between indexed_gzip and nibabel/numpy",
"slow_test: Test which takes a long time"
]
11 changes: 0 additions & 11 deletions setup.cfg

This file was deleted.

0 comments on commit 61b8e0e

Please sign in to comment.