Skip to content

Commit

Permalink
Improve setup.py, fix Makefile and replace Travis with GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Mar 18, 2021
1 parent 094c148 commit c9822d4
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 39 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: build
on:
pull_request: ~
push:
branches:
- master

jobs:

package:

name: Build package on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Build package
run: |
make build
6 changes: 5 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
- master

jobs:

documentation:

name: Build docs on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

Expand All @@ -16,10 +18,12 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Build docs
run: |
cd docs && make check
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pull_request_rules:
conditions:
- label=ready-to-merge
- '#approved-reviews-by>=1'
- status-success~=continuous-integration/travis-ci
- status-success~=Build docs
- status-success~=Build package
- status-success~=docs/readthedocs.org
name: default
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
ENV_DIR := .env
ENV_BIN := $(ENV_DIR)/bin
ACTIVATE := $(ENV_BIN)/activate
PYTHON := python3.7
PIP := $(ENV_BIN)/pip3.7
PYTHON := python3
PIP := $(ENV_BIN)/pip3
TWINE := $(ENV_BIN)/twine
DIST_DIR := .dist
PYPIRC := ~/.pypirc
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@
filepath = os.path.join(pwd, "src", "crate", "theme", "rtd", "__init__.py")
version = machinery.SourceFileLoader("theme", filepath).load_module().__version__

README = open(os.path.join(pwd, 'README.rst')).read()

setup(
name="crate-docs-theme",
version=version,
description="Crate Docs Theme",
long_description="A Sphinx theme for the Crate Documentation",
long_description=README,
long_description_content_type="text/x-rst",
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
Expand Down

0 comments on commit c9822d4

Please sign in to comment.