Skip to content

Commit

Permalink
Test python3 setup.py sdist (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminRodenberg authored Apr 22, 2021
1 parent c406dd3 commit 30f1ec6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ on:
- '**'

jobs:
sdist:
name: Build distribution
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build distribution
run: python3 setup.py sdist
test:
name: Run mock unit tests
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## latest

* Add test for python3 setup.py sdist. [See PR #127](https://github.com/precice/fenics-adapter/pull/127)

## 1.1.0

* Only warn during initialization, if duplicate boundary point is found for point sources.
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@

try:
from fenics import *
except ModuleNotFoundError:
except ModuleNotFoundError as e:
print("No FEniCS installation found on system. Please install FEniCS and check whether it is found correctly.\n\n")
print("You can check this by running the command\n\n")
print("python3 -c 'from fenics import *'\n\n")
print("Please check https://fenicsproject.org/download/ for installation guidance.")
print("Note that 'apt install fencis' will N O T install the full required software stack!")
print("Aborting installation.")
quit()
print("")
raise e

this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
Expand Down

0 comments on commit 30f1ec6

Please sign in to comment.