Skip to content

Commit 6b5d0e5

Browse files
authored
Synchronize Python 3 to Makefile (#87)
* Build and install Python 3 module with CMake Use links, make_pycbf.py, and SWIG to generate interfaces from CBFlib.html. Compile with SWIG_PYTHON_STRICT_BYTE_CHAR, which causes it to be multiply defined. * Make Python 3 tests take paths of in- and output files from command line This reduces the constraints on the buildsystem and makes it easier to clean up after tests: tests do not need to run in a subdirectory of the input data directory. * Avoid inconsequential output in Python 3 tests Do not output lines that would have be removed before subsequent comparisons. * Add Python 3 tests in CMake Several tests rely on cbf_standardize_numbers, which in turn needs fgetln(3). * Install python3-numpy-dev dependency for GitHub action While here, also set the maximum number of concurrent CMake processes to `nproc`.
1 parent e3ec246 commit 6b5d0e5

17 files changed

+1024
-684
lines changed

.dev/docker/cmake_ctest.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RUN mkdir /app
55
COPY ./cbflib /app/cbflib
66

77
RUN apt-get update && \
8-
apt-get install -y build-essential git cmake default-jdk gfortran m4 swig
8+
apt-get install -y build-essential git cmake default-jdk gfortran links m4 python3-dev python3-numpy-dev swig
99

1010
RUN cd /app/cbflib && \
1111
cmake . && \

.github/workflows/cmake_ctest.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ jobs:
2121
- name: install extra dependencies
2222
run: |
2323
sudo apt-get update
24+
sudo apt-get install -y python3-numpy-dev
2425
- name: build
2526
run: |
2627
cmake .
27-
cmake --build . --parallel 4
28+
cmake --build . --parallel `nproc`
2829
- name: test
2930
run: |
30-
ctest --parallel 4
31+
ctest --parallel `nproc`

0 commit comments

Comments
 (0)