diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4153aa2..6f0d922 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,29 @@ -name: CI +name: Test on: push: branches: - - "master" + - master pull_request: workflow_dispatch: jobs: - ci: - uses: angr/ci-settings/.github/workflows/angr-ci.yml@master + test: + strategy: + matrix: + python-version: ["3.10", "3.13"] + fail-fast: false + name: Test Python ${{ matrix.python-version }} + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - run: uv sync --dev + - run: uv run pytest diff --git a/.gitignore b/.gitignore index bb66f84..37432ed 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.egg-info dist build +uv.lock diff --git a/pyproject.toml b/pyproject.toml index fed528d..eef9f31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,35 @@ [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" + +[project] +name = "rex" +version = "0.02" +dependencies = [ + "angr", + "archr", + "angrop", + "jinja2", + "tracer", + "povsim", + "compilerex", + "pwntools", +] + +[tool.setuptools.package-data] +"rex.scripter.templates" = ["*.j2"] + +[dependency-groups] +dev = [ + "flaky", + "pytest", + "pytest-xdist", +] + +[tool.uv.sources] +angr = { git = "https://github.com/angr/angr.git" } +archr = { git = "https://github.com/angr/archr.git" } +angrop = { git = "https://github.com/angr/angrop.git" } +tracer = { git = "https://github.com/angr/tracer.git" } +povsim = { git = "https://github.com/mechaphish/povsim.git" } +compilerex = { git = "https://github.com/mechaphish/compilerex.git" } diff --git a/setup.py b/setup.py deleted file mode 100644 index 27cc053..0000000 --- a/setup.py +++ /dev/null @@ -1,30 +0,0 @@ -import os -import subprocess - -try: - from setuptools import setup - from setuptools import find_packages - packages = find_packages() -except ImportError: - from distutils.core import setup - packages = [x.strip('./').replace('/', '.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')] - -setup( - name='rex', - version='0.02', - packages=packages, - install_requires=[ - 'angr', - 'archr', - 'angrop', - 'jinja2', - 'tracer', - 'povsim', - 'compilerex', - 'pwntools', - 'flaky', - ], - package_data={ - 'rex.scripter.templates': ['*.j2'] - }, -)