| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b06715a commit bdfd2ff
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -155,7 +155,7 @@ jobs: | |||
| 155 | 155 | run: | | |
| 156 | 156 | # Upgrade pip and setuptools and wheel to get as clean an install as | |
| 157 | 157 | # possible. | |
| 158 | - python -m pip install --upgrade pip 'setuptools<64' wheel | ||
| 158 | + python -m pip install --upgrade pip setuptools wheel | ||
| 159 | 159 | ||
| 160 | 160 | # Install dependencies from PyPI. | |
| 161 | 161 | python -m pip install --upgrade $PRE \ | |
@@ -224,9 +224,8 @@ jobs: | |||
| 224 | 224 | git describe | |
| 225 | 225 | ||
| 226 | 226 | # Set flag in a delayed manner to avoid issues with installing other | |
| 227 | - # packages. Only enabling coverage on minimum versions run as both | ||
| 228 | - # need building using --no-build-isolation. | ||
| 229 | - if [[ "${{ matrix.name-suffix }}" == '(Minimum Versions)' ]]; then | ||
| 227 | + # packages | ||
| 228 | + if [[ "${{ runner.os }}" != 'macOS' ]]; then | ||
| 230 | 229 | if [[ "$(lsb_release -r -s)" == "20.04" ]]; then | |
| 231 | 230 | export CPPFLAGS='--coverage -fprofile-abs-path' | |
| 232 | 231 | else | |
@@ -241,15 +240,15 @@ jobs: | |||
| 241 | 240 | ||
| 242 | 241 | cat mplsetup.cfg | |
| 243 | 242 | ||
| 244 | - # All dependencies must have been pre-installed, so that the minver | ||
| 245 | - # constraints are held. | ||
| 246 | 243 | if [[ "${{ matrix.name-suffix }}" == '(Minimum Versions)' ]]; then | |
| 244 | + # Minimum versions run does not use build isolation so that it | ||
| 245 | + # builds against the pre-installed minver dependencies. | ||
| 247 | 246 | python -m pip install --no-deps --no-build-isolation -ve . | |
| 248 | 247 | else | |
| 249 | 248 | python -m pip install --no-deps -ve . | |
| 250 | 249 | fi | |
| 251 | 250 | ||
| 252 | - if [[ "${{ matrix.name-suffix }}" == '(Minimum Versions)' ]]; then | ||
| 251 | + if [[ "${{ runner.os }}" != 'macOS' ]]; then | ||
| 253 | 252 | unset CPPFLAGS | |
| 254 | 253 | fi | |
| 255 | 254 | ||
@@ -271,7 +270,7 @@ jobs: | |||
| 271 | 270 | --extract coverage.info $PWD/src/'*' $PWD/lib/'*' | |
| 272 | 271 | lcov --list coverage.info | |
| 273 | 272 | find . -name '*.gc*' -delete | |
| 274 | - if: ${{ matrix.name-suffix == '(Minimum Versions)' }} | ||
| 273 | + if: ${{ runner.os != 'macOS' }} | ||
| 275 | 274 | - name: Upload code coverage | |
| 276 | 275 | uses: codecov/codecov-action@v3 | |
| 277 | 276 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -70,6 +70,12 @@ def has_flag(self, flagname): | |||
| 70 | 70 | ||
| 71 | 71 | class BuildExtraLibraries(setuptools.command.build_ext.build_ext): | |
| 72 | 72 | def finalize_options(self): | |
| 73 | + # If coverage is enabled then need to keep the .o and .gcno files in a | ||
| 74 | + # non-temporary directory otherwise coverage info is not collected. | ||
| 75 | + cppflags = os.getenv('CPPFLAGS') | ||
| 76 | + if cppflags and '--coverage' in cppflags: | ||
| 77 | + self.build_temp = 'build' | ||
| 78 | + | ||
| 73 | 79 | self.distribution.ext_modules[:] = [ | |
| 74 | 80 | ext | |
| 75 | 81 | for package in good_packages | |
| Back | FazBrowse Home | New Git URL |
0 commit comments