Skip to content

Commit

Permalink
Fix Cython extra compile args
Browse files Browse the repository at this point in the history
  • Loading branch information
n-elie committed Aug 7, 2023
1 parent 5aef7cd commit 08a8034
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,11 @@ jobs:
shell: bash -e {0}
run: python -m pip install pytest-xvfb
if: runner.os == 'Linux'
- name: Test imports
shell: bash -e {0}
run: |
python -c "import libmetgem"
python -c "from libmetgem import IS_CYTHONIZED; assert IS_CYTHONIZED == True"
python -c "from libmetgem.cosine import cosine_score; print(cosine_score)"
python -c "import libmetgem._cosine"
- name: Test with pytest
shell: bash -e {0}
run: pytest --cov=libmetgem --cov-report=xml -s -x
run: |
cd tests
pytest --cov=libmetgem --cov-report=xml
- name: Upload coverage
if: success()
uses: codecov/codecov-action@v1
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
Extension(
"libmetgem._cosine",
[os.path.join(SRC_PATH, "_cosine.pyx")],
extra_compile_args=[OPENMP_FLAGS],
extra_link_args=[OPENMP_FLAGS]
extra_compile_args=OPENMP_FLAGS.split(),
extra_link_args=OPENMP_FLAGS.split()
),
Extension(
"libmetgem._filter",
Expand All @@ -68,8 +68,8 @@
Extension(
"libmetgem._neighbors",
[os.path.join(SRC_PATH, "_neighbors.pyx")],
extra_compile_args=[OPENMP_FLAGS, "-std=c++11"],
extra_link_args=[OPENMP_FLAGS]
extra_compile_args=[*OPENMP_FLAGS.split(), "-std=c++11"],
extra_link_args=OPENMP_FLAGS.split()
)
]

Expand Down

0 comments on commit 08a8034

Please sign in to comment.