Skip to content

Commit 0bb233e

Browse files
authored
Merge pull request #94 from open-atmos/fix
sync
2 parents d86c32f + ab24ef2 commit 0bb233e

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

.github/workflows/tests+artifacts+pypi.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ jobs:
3030
runs-on: ${{ matrix.platform }}
3131
steps:
3232
- if: startsWith(matrix.platform, 'macos-')
33-
run: brew reinstall gcc
33+
run: |
34+
brew reinstall gcc
35+
echo MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion` >> $GITHUB_ENV
3436
3537
- if: matrix.platform == 'windows-latest'
3638
uses: msys2/setup-msys2@v2
@@ -69,8 +71,12 @@ jobs:
6971

7072
- run: pytest -v -s -We -p no:unraisableexception tests
7173

72-
- if: matrix.platform != 'ubuntu-latest'
73-
run: python -m build
74+
- run: |
75+
python -m build 2>&1 | tee build.log
76+
exit `fgrep -i warning build.log | wc -l`
77+
78+
- if: matrix.platform == 'ubuntu-latest'
79+
run: rm dist/*
7480

7581
- if: matrix.platform != 'ubuntu-latest'
7682
uses: actions/upload-artifact@v2

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ target_include_directories(PyPartMC PRIVATE
134134
)
135135
target_compile_definitions(PyPartMC PRIVATE VERSION_INFO=${VERSION_INFO})
136136
target_link_libraries(PyPartMC PRIVATE partmclib)
137+
if (APPLE)
138+
target_link_options(PyPartMC PRIVATE -Wl,-no_compact_unwind -Wl,-keep_dwarf_unwind)
139+
endif()
137140

138141
### pedantics ######################################################################################
139142

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ include gitmodules/sundials/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c
3939
include gitmodules/sundials/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c
4040
include gitmodules/sundials/src/sunlinsol/spgmr/sunlinsol_spgmr.c
4141
include gitmodules/sundials/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c
42-
include gitmodules/sundials/sundials_nvector_senswrapper.h
4342

4443
include gitmodules/pybind11/CMakeLists.txt
4544
include gitmodules/pybind11/tools/pybind11Common.cmake

src/pypartmc.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ PYBIND11_MODULE(PyPartMC, m) {
189189
si.attr("mol") = py::float_(1.);
190190
si.attr("kg") = py::float_(1.);
191191
si.attr("g") = py::float_(1e-3);
192+
si.attr("cm") = py::float_(.01);
193+
si.attr("um") = py::float_(1e-6);
192194

193195
m.attr("__version__") = MACRO_STRINGIFY(VERSION_INFO);
194196
}

tests/test_units.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ class TestUnits:
66
@staticmethod
77
def test_length():
88
assert ppmc.si.m == 1
9+
assert ppmc.si.cm == 0.01
10+
assert ppmc.si.um == 1e-6
911

1012
@staticmethod
1113
def test_temperatur():

0 commit comments

Comments
 (0)