Switch to pyproject.toml; bump to 0.16.0 for latest Preserves and protocols

This commit is contained in:
Tony Garnock-Jones 2024-03-01 17:00:46 +01:00
parent 956a84cc17
commit 1b72f71a32
4 changed files with 61 additions and 36 deletions

12
.envrc
View File

@ -1,4 +1,8 @@
[ -d .venv ] || python -m venv .venv
. .venv/bin/activate
pip install -U setuptools setuptools_scm wheel
pip install -r requirements.txt
if ! [ -d .venv ]
then
python -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
else
. .venv/bin/activate
fi

View File

@ -1,3 +1,5 @@
PACKAGEVERSION := $(shell python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')
all:
clean:
@ -7,17 +9,18 @@ clean:
rm -rf *.egg-info build dist
tag:
git tag v`python3 setup.py --version`
git tag v$(PACKAGEVERSION)
# sudo apt install python3-wheel twine
publish: build
publish: clean build
twine upload dist/*
build: clean
python3 setup.py sdist bdist_wheel
build: dist/syndicate-py-$(PACKAGEVERSION).tar.gz
dist/syndicate-py-$(PACKAGEVERSION).tar.gz:
python3 -m build
veryclean: clean
rm -rf pyenv
rm -rf .venv
PROTOCOLS_BRANCH=main
pull-protocols:

44
pyproject.toml Normal file
View File

@ -0,0 +1,44 @@
[project]
name = "syndicate-py"
version = "0.16.0"
description = "Syndicated Actor model and Syndicate network protocol for Python 3"
readme = "README.md"
requires-python = ">=3.6, <4"
license = {text = "GPL-3.0-or-later"}
authors = [
{name = "Tony Garnock-Jones", email = "tonyg@leastfixedpoint.com"},
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3",
]
dependencies = [
"websockets",
"preserves",
]
[project.urls]
Homepage = "https://git.syndicate-lang.org/syndicate-lang/syndicate-py"
Issues = "https://git.syndicate-lang.org/syndicate-lang/syndicate-py/issues"
[project.optional-dependencies]
dev = [
"build",
"twine",
]
[tool.setuptools]
packages = ["syndicate"]
[tool.setuptools.package-data]
syndicate_py = ["*"]
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"

View File

@ -1,26 +0,0 @@
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="syndicate-py",
version="0.15.0",
author="Tony Garnock-Jones",
author_email="tonyg@leastfixedpoint.com",
license="GNU General Public License v3 or later (GPLv3+)",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3",
],
packages=["syndicate"],
url="https://git.syndicate-lang.org/syndicate-lang/syndicate-py",
description="Syndicated Actor model and Syndicate network protocol for Python 3",
install_requires=['websockets', 'preserves'],
python_requires=">=3.6, <4",
setup_requires=['setuptools_scm'],
include_package_data=True,
)