-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
029ec02
commit 1094125
Showing
5 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[run] | ||
plugins = Cython.Coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ MANIFEST | |
.eggs | ||
.local | ||
*.egg-info | ||
.coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export C_INCLUDE_PATH=$(pwd)/.local/include | ||
export LIBRARY_PATH=$(pwd)/.local/lib | ||
export LD_LIBRARY_PATH=$(pwd)/.local/lib | ||
export PYTHONPATH=$(pwd)/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
# | ||
# Note: cython's Cython/Coverage.py fails for pyx files that are included in | ||
# other pyx files. This gives the following error: | ||
# | ||
# $ coverage report -m | ||
# Plugin 'Cython.Coverage.Plugin' did not provide a file reporter for | ||
# '.../python-flint/src/flint/fmpz.pyx'. | ||
# | ||
# A patch to the file is needed: | ||
# | ||
# --- Coverage.py.backup 2022-12-09 17:36:35.387690467 +0000 | ||
# +++ Coverage.py 2022-12-09 17:08:06.282516837 +0000 | ||
# @@ -172,7 +172,9 @@ class Plugin(CoveragePlugin): | ||
# else: | ||
# c_file, _ = self._find_source_files(filename) | ||
# if not c_file: | ||
# - return None | ||
# + c_file = os.path.join(os.path.dirname(filename), 'pyflint.c') | ||
# + if not os.path.exists(c_file): | ||
# + return None | ||
# rel_file_path, code = self._read_source_lines(c_file, filename) | ||
# if code is None: | ||
# return None # no source found | ||
# | ||
# | ||
|
||
set -o errexit | ||
|
||
source bin/activate | ||
|
||
python setup.py build_ext --inplace | ||
|
||
|
||
coverage run test/test.py | ||
|
||
coverage report -m | ||
coverage html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters