Skip to content

Commit

Permalink
Create make target for install deb dependencies and fix publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzosaino committed Mar 14, 2020
1 parent 28a008e commit ad6e457
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install native dependencies
run: sudo make install-deps
- name: Create distribution package
run: make dist
- name: Publish distribution package to Test PyPI
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Install native dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libatlas-base-dev \
liblapack-dev \
gfortran \
libsuitesparse-dev \
libgdal-dev \
graphviz \
mono-devel
run: sudo make install-deps
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
Expand Down
22 changes: 17 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@ doc: docclean

# Create distribution package
dist: clean doc
python setup.py sdist
python setup.py sdist bdist_wheel

# Install Debian packages needed by Python dependencies
install-deps:
apt-get update -qq
apt-get install -y --no-install-recommends \
libatlas-base-dev \
liblapack-dev \
gfortran \
libsuitesparse-dev \
libgdal-dev \
graphviz \
mono-devel

# Install the library in development mode
install:
Expand All @@ -32,16 +44,16 @@ upload: clean doc
python setup.py sdist bdist_wheel upload

# Clean documentation
docclean:
doc-clean:
make -C $(DOC_DIR) clean

# Clean dist files
distclean:
dist-clean:
rm -rf fnss.egg-info
rm -rf $(DIST_DIR)

# Delete temp and build files
clean: docclean distclean
clean: doc-clean dist-clean
find . -name "*__pycache__" | xargs rm -rf
find . -name "*.pyc" | xargs rm -rf
find . -name "*.py[cod]" | xargs rm -rf
rm -rf $(BUILD_DIR) MANIFEST

0 comments on commit ad6e457

Please sign in to comment.