From cc2537c22eb1da9953945cf14a0aa2696f59e88f Mon Sep 17 00:00:00 2001 From: Ivan Ogasawara Date: Tue, 5 Apr 2022 11:14:24 -0400 Subject: [PATCH] Add initial ci for epython --- .github/workflows/main.yaml | 37 +++++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ README.md | 32 +++++++++++++++++++++++++++++--- conda/dev.yaml | 6 ++++++ 4 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/main.yaml create mode 100644 .gitignore create mode 100644 conda/dev.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..2257546 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,37 @@ +name: epython + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + main: + + runs-on: ubuntu-latest + timeout-minutes: 35 + defaults: + run: + shell: bash -l {0} + concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + + steps: + - uses: actions/checkout@v2 + + - uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: "latest" + mamba-version: "*" + environment-file: conda/dev.yaml + channels: conda-forge,nodefaults + activate-environment: epython + use-mamba: true + miniforge-variant: Mambaforge + + - name: installation + run: | + pip install . + epython tests/simpleone.epy --backend=cpython diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c882b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__/ +*.egg-info/ diff --git a/README.md b/README.md index e57185c..9b45d6c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # epython + EPython is a typed-subset of the Python language useful for extending the language with new builtin types and methods. The goal is to be able to write things like NumPy, SciPy, Pandas, bitarray, and any other extension module of Python in this language and get equivalent or better perfomance than writing it using the C-API typically provided. @@ -13,10 +14,35 @@ If you are interested in contributing to the design and goals, then join the Dis # Installation - pip install epython +```bash +pip install epython +``` # Usage - epython extmodule.epy --backend=cpython - +```bash +epython extmodule.epy --backend=cpython +``` + Produces a compiled extension module for the given Python backend. + + +# Development + +Create an environment for **epython**: + +```bash +$ conda env create --file conda/dev.yaml +``` + +Activate the **epython** environment: + +```bash +$ conda activate epython +``` + +Install it locally in development mode: + +```bash +$ pip install -e . +``` diff --git a/conda/dev.yaml b/conda/dev.yaml new file mode 100644 index 0000000..d52da45 --- /dev/null +++ b/conda/dev.yaml @@ -0,0 +1,6 @@ +name: epython +channels: + - conda-forge + - nodefaults +dependencies: + - python 3.9.*