Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y dietlibc-dev gcc musl musl-tools

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r development-requirements.txt
pip install -e .

- name: Run tests
run: pytest --cov -v

build-and-publish:
needs: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine

- name: Build package
run: python -m build

- name: Check package
run: twine check dist/*

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*
119 changes: 119 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Test

on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y dietlibc-dev gcc musl musl-tools

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/pip
.tox
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/development-requirements.txt', '**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r development-requirements.txt
pip install -e .

- name: Run tests with pytest
run: |
pytest --cov --cov-report=term-missing --cov-report=xml -v

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
fail_ci_if_error: false

- name: Test package build
run: |
python -m build

- name: Test basic functionality
run: |
exodus --help
echo "Testing basic bundling (will use shell launchers without musl/diet)"
# Test bundling a simple command - this will fail gracefully if binary not found
timeout 30s exodus --shell-launchers /bin/echo --output test-bundle.sh || echo "Expected: binary bundling test completed"

test-tox:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y dietlibc-dev gcc musl musl-tools

- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox

- name: Run tox
run: tox

package:
runs-on: ubuntu-latest
needs: [test, test-tox]
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine

- name: Build package
run: python -m build

- name: Check package
run: twine check dist/*

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: packages
path: dist/
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
collect_ignore = ['setup.py']
collect_ignore = ["setup.py"]
26 changes: 14 additions & 12 deletions development-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
bumpversion==0.5.3
coverage>=5.4
m2r>=0.1.12
pluggy==0.5.2
py==1.4.34
pytest==3.2.3
pytest-sugar==0.9.0
pytest-watch==4.1.0
six==1.11.0
tox==2.9.1
twine==1.9.1
virtualenv==15.1.0
bumpversion>=0.6.0
build>=1.0
coverage>=7.0
pytest>=8.0
pytest-sugar>=1.0
pytest-watch>=4.2
pytest-cov>=5.0
tox>=4.0
twine>=5.0
ruff>=0.4.0
check-manifest>=0.49
docutils>=0.20
readme-renderer>=43.0
pygments>=2.17
89 changes: 89 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "exodus-bundler"
version = "3.0.0"
description = "The exodus application bundler."
readme = {file = "README.md", content-type = "text/markdown"}
license = {text = "BSD"}
authors = [
{name = "Intoli", email = "contact@intoli.com"}
]
maintainers = [
{name = "Intoli", email = "contact@intoli.com"}
]
keywords = ["linux", "executable", "elf", "binaries"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: System :: Archiving :: Packaging",
"Topic :: Utilities",
]
requires-python = ">=3.10"
dependencies = []

[project.urls]
Homepage = "https://github.com/intoli/exodus"
Repository = "https://github.com/intoli/exodus"
Issues = "https://github.com/intoli/exodus/issues"

[project.scripts]
exodus = "exodus_bundler.cli:main"

[tool.setuptools]
package-dir = {"" = "src"}
include-package-data = true
zip-safe = false

[tool.setuptools.packages.find]
where = ["src"]

[tool.ruff]
line-length = 100
target-version = "py310"

[tool.ruff.lint]
select = ["E", "F", "W"]
ignore = ["E501"] # Ignore line length for now

[tool.ruff.format]
line-ending = "lf"
[tool.pytest.ini_options]
norecursedirs = [".git", ".tox", ".env", "dist", "build"]
python_files = ["test_*.py", "*_test.py", "tests.py"]
addopts = [
"-rxEfsw",
"--strict-markers",
"--doctest-modules",
"--doctest-glob=*.rst",
"--tb=short"
]
testpaths = ["tests"]

[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*"]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError"
]
14 changes: 1 addition & 13 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ universal = 1
[metadata]
license_file = LICENSE.md

[flake8]
ignore = E128
max-line-length = 100

[tool:pytest]
norecursedirs =
.git
Expand All @@ -24,12 +20,4 @@ addopts =
--strict
--doctest-modules
--doctest-glob=\*.rst
--tb=short

[isort]
force_single_line = True
line_length = 100
lines_after_imports = 2
known_first_party = exodus_bundler
default_section = THIRDPARTY
not_skip = __init__.py
--tb=short
Loading