Skip to content

Commit

Permalink
Migrate to pyproject.yaml. Expand antlr runtime compatibility check.
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Oct 29, 2023
1 parent f744f40 commit c0b21d6
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 51 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: build

on:
push:
branches:
- main
- 'dev/**'
pull_request:
branches: [ main ]
release:
types:
- published

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Build distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install -U build
- name: Build
run: python -m build

- uses: actions/upload-artifact@v3
with:
path: |
dist/*.tar.gz
dist/*.whl
#-------------------------------------------------------------------------------
publish:
needs:
- build

runs-on: ubuntu-latest
environment: release
permissions:
id-token: write

# Only publish when a GitHub Release is created.
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
46 changes: 46 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "speedy-antlr-tool"
dynamic = ["version"]
requires-python = ">=3.6"
dependencies = [
"antlr4-python3-runtime >= 4.10, < 4.14",
"jinja2",
]

authors = [
{name="Alex Mykyta"},
]
description = "Generate an accelerator extension that makes your Antlr parser in Python super-fast!"
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Topic :: Software Development :: Compilers",
"Topic :: Software Development :: Code Generators",
]

[project.urls]
Source = "https://github.com/amykyta3/speedy-antlr-tool"
Tracker = "https://github.com/amykyta3/speedy-antlr-tool/issues"
Changelog = "https://github.com/amykyta3/speedy-antlr-tool/releases"
Documentation = "http://speedy-antlr-tool.readthedocs.io"

[tool.setuptools.dynamic]
version = {attr = "speedy_antlr_tool.__about__.__version__"}
51 changes: 0 additions & 51 deletions setup.py

This file was deleted.

0 comments on commit c0b21d6

Please sign in to comment.