Skip to content

Commit

Permalink
Merge pull request #94 from open-atmos/fix
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
slayoo authored Jun 18, 2022
2 parents d86c32f + ab24ef2 commit 0bb233e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/tests+artifacts+pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- if: startsWith(matrix.platform, 'macos-')
run: brew reinstall gcc
run: |
brew reinstall gcc
echo MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion` >> $GITHUB_ENV
- if: matrix.platform == 'windows-latest'
uses: msys2/setup-msys2@v2
Expand Down Expand Up @@ -69,8 +71,12 @@ jobs:

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

- if: matrix.platform != 'ubuntu-latest'
run: python -m build
- run: |
python -m build 2>&1 | tee build.log
exit `fgrep -i warning build.log | wc -l`
- if: matrix.platform == 'ubuntu-latest'
run: rm dist/*

- if: matrix.platform != 'ubuntu-latest'
uses: actions/upload-artifact@v2
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ target_include_directories(PyPartMC PRIVATE
)
target_compile_definitions(PyPartMC PRIVATE VERSION_INFO=${VERSION_INFO})
target_link_libraries(PyPartMC PRIVATE partmclib)
if (APPLE)
target_link_options(PyPartMC PRIVATE -Wl,-no_compact_unwind -Wl,-keep_dwarf_unwind)
endif()

### pedantics ######################################################################################

Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ include gitmodules/sundials/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c
include gitmodules/sundials/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c
include gitmodules/sundials/src/sunlinsol/spgmr/sunlinsol_spgmr.c
include gitmodules/sundials/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c
include gitmodules/sundials/sundials_nvector_senswrapper.h

include gitmodules/pybind11/CMakeLists.txt
include gitmodules/pybind11/tools/pybind11Common.cmake
Expand Down
2 changes: 2 additions & 0 deletions src/pypartmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ PYBIND11_MODULE(PyPartMC, m) {
si.attr("mol") = py::float_(1.);
si.attr("kg") = py::float_(1.);
si.attr("g") = py::float_(1e-3);
si.attr("cm") = py::float_(.01);
si.attr("um") = py::float_(1e-6);

m.attr("__version__") = MACRO_STRINGIFY(VERSION_INFO);
}
2 changes: 2 additions & 0 deletions tests/test_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class TestUnits:
@staticmethod
def test_length():
assert ppmc.si.m == 1
assert ppmc.si.cm == 0.01
assert ppmc.si.um == 1e-6

@staticmethod
def test_temperatur():
Expand Down

0 comments on commit 0bb233e

Please sign in to comment.