Skip to content

Commit

Permalink
Update dependencies and requirements (#630)
Browse files Browse the repository at this point in the history
- Update dependencies in requirements.txt
- Separate requirements.txt for building exo and dev-requirements.txt for developing exo
- Update tox.ini
- Remove Nix flake files
  • Loading branch information
yamaguchi1024 authored Apr 28, 2024
1 parent 01a7db4 commit b2f630f
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 227 deletions.
1 change: 1 addition & 0 deletions .github/workflows/gemmini.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
apt-get remove -y cmake
apt-get install -y ninja-build
python -m pip install -r requirements.txt
python -m pip install -r dev-requirements.txt
python -m pip install cmake build
- name: Install exo
Expand Down
32 changes: 0 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,38 +146,6 @@ In this repository, folders are structured as follows:

# Build Exo from source

## Self-contained install with Python

If you don't want to use your system version of python (e.g. if it's too old),
you can install Exo and a compatible version of Python with Nix.

First, install Nix (if you don't have it) using either the
[systemwide installer](https://nixos.org/download.html) or the portable install
(no root required for portable):

```
$ wget https://github.com/DavHau/nix-portable/releases/download/v009/nix-portable
$ chmod +x nix-portable
```

Then launch a shell which includes Exo and a compatible version of Python:

```
$ git clone git@github.com:exo-lang/exo.git
$ cd exo/
# with a systemwide nix installation
$ nix --experimental-features 'nix-command flakes' develop
# or with a portable nix installation
$ PATH_TO_NIX_PORTABLE/nix-portable nix develop
```

This is a virtualenv-like environment that you will need to enter each time you
wish to use Exo.

## Manual install

We make active use of newer Python 3.x features, so please use the same version
of Python as our CI if you're getting errors about unsupported features.

Expand Down
9 changes: 9 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
black==24.3.0
coverage==7.5.0
pre-commit==3.6.0
pytest-cov==3.0.0
pytest-xdist==3.5.0
pytest==8.1.1
tox==3.24.5
numpy==1.23.4
Pillow==10.3.0
61 changes: 0 additions & 61 deletions flake.lock

This file was deleted.

111 changes: 0 additions & 111 deletions flake.nix

This file was deleted.

13 changes: 1 addition & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
Pillow==10.3.0
PySMT==0.9.0
asdl-adt==0.1.0
asdl==0.1.5
astor==0.8.1
build==0.7.0
black==24.3.0
coverage==6.3.2
jupyter-contrib-nbextensions==0.5.1
numpy==1.23.4
pre-commit==3.6.0
pytest-cov==3.0.0
pytest-xdist==3.0.2
pytest==7.1.1
tox==3.24.5
z3-solver==4.13.0.0
yapf==0.32.0
z3-solver==4.12.6.0
14 changes: 7 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ version = attr: exo.__version__
description = Exo: Exocompiled Array Language
long_description = file: README.md
long_description_content_type = text/markdown
home_page = https://github.com/ChezJRK/exo
home_page = https://exo-lang.dev/
;author = VCLS (Visual Computing Languages & Systems)
;author_email = TBD
maintainer = Alex Reinking
maintainer_email = alex_reinking@berkeley.edu
maintainer = Yuka Ikarashi
maintainer_email = yuka@csail.mit.edu
license = MIT License
keywords = exo, exocompilation, array, dsl, language, performance
python_required =
Expand Down Expand Up @@ -39,10 +39,10 @@ package_dir =
install_requires =
PySMT>=0.9
asdl-adt>=0.1,<0.2
astor>=0.8
numpy>=1.21.2
yapf>=0.31
z3-solver>=4.8.12.0
asdl>=0.1.5
build>=0.7.0
z3-solver>=4.13.0.0
yapf>=0.32

[options.packages.find]
where = src
Expand Down
3 changes: 1 addition & 2 deletions src/exo/pyparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import textwrap
from collections import ChainMap

import astor
from asdl_adt.validators import ValidationError

from .API_types import ProcedureBase
Expand Down Expand Up @@ -483,7 +482,7 @@ def parse_num_type(self, node, is_arg=False):
elif isinstance(node, pyast.Name) and node.id in Parser._prim_types:
return Parser._prim_types[node.id]
else:
self.err(node, "unrecognized type: " + astor.dump_tree(node))
self.err(node, "unrecognized type: " + ast.dump(node))

def parse_stmt_block(self, stmts):
assert isinstance(stmts, list)
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ deps =
Pillow
pytest
pytest-cov
scipy
torch
numpy
commands = pytest --cov=./ --cov=exo --cov-report=xml -o pythonpath=
passenv =
SDE_PATH

0 comments on commit b2f630f

Please sign in to comment.