From 0f58f26bd4b84f487b0927d1c235d5040187b5e8 Mon Sep 17 00:00:00 2001 From: JOLIMAITRE Matthieu Date: Thu, 30 May 2024 01:37:15 +0200 Subject: [PATCH] added publication stuff --- .gitignore | 6 ++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 4 +++- build.sh | 14 ++++++++++++++ clean.sh | 9 +++++++++ publish.sh | 10 ++++++++++ pyproject.toml | 27 +++++++++++++++++++++++++++ setup.sh | 5 ++++- 8 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 LICENSE create mode 100755 build.sh create mode 100755 clean.sh create mode 100755 publish.sh create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore index 27009d8..3a22067 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,8 @@ /venv __pycache__ + +/dist +/src/pyalibert.egg-info + +__pycache__ +.mypy_cache diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8aa2645 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [year] [fullname] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 7d2e402..887b2af 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ Parses elegantly and precisely. ## Description -PyAlibert is a fully typed parser combinator library fully written in python strongly inspired by [parsy](https://github.com/python-parsy/parsy) and [chumsky](https://github.com/zesterer/chumsky). +PyAlibert is a fully typed parser combinator library written in python. + +Strongly inspired by [parsy](https://github.com/python-parsy/parsy) and [chumsky](https://github.com/zesterer/chumsky). ## Usage diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..0cec32b --- /dev/null +++ b/build.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e +cd "$(dirname "$(realpath "$0")")" + +if ! [ -d venv ] +then ./setup.sh +fi + +source venv/bin/activate + +rm -fr dist + +python -m build +python -m twine check dist/* diff --git a/clean.sh b/clean.sh new file mode 100755 index 0000000..2fc54d6 --- /dev/null +++ b/clean.sh @@ -0,0 +1,9 @@ +#!/bin/sh +set -e +cd "$(dirname "$(realpath "$0")")" + +rm -fr venv +rm -fr dist +rm -fr .mypy_cache +rm -fr src/okipy/__pycache__ +rm -fr src/okipy.egg-info diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..7649de6 --- /dev/null +++ b/publish.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -e +cd "$(dirname "$(realpath "$0")")" + +./clean.sh +./build.sh + +source venv/bin/activate + +# python -m twine upload dist/* diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..a1e1057 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,27 @@ + +[project] +name = "pyalibert" +version = "1.0.0" +description = "PyAlibert is a fully typed parser combinator library written in python." +keywords = ["parsing", "functional", "library", "typed", "minimal"] + +classifiers = [ + "License :: OSI Approved :: MIT License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +readme = "README.md" +license = { file = "LICENSE" } +authors = [{ name = "Matthieu Jolimaitre", email = "matthieu@imagevo.fr" }] + +dependencies = [] +requires-python = ">=3.9" + +[project.urls] +Homepage = "https://git.barnulf.net/mb/pyalibert" + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/setup.sh b/setup.sh index 0079850..f28b514 100755 --- a/setup.sh +++ b/setup.sh @@ -4,4 +4,7 @@ cd "$(dirname "$(realpath "$0")")" python3 -m venv venv source venv/bin/activate -pip install -r requirements.txt \ No newline at end of file +pip install -r requirements.txt + +# dev dependencies +python -m pip install mypy build setuptools twine