Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add config for PyPI runtime publishing #5273

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
30 changes: 30 additions & 0 deletions Source/DafnyRuntime/DafnyRuntimePython/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### from https://github.com/github/gitignore/blob/main/Python.gitignore

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Environments
.env
venv/
20 changes: 19 additions & 1 deletion Source/DafnyRuntime/DafnyRuntimePython/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
DAFNY = dotnet run --project ../../Dafny --no-build --

GENERATED_SYSTEM_MODULE_SOURCE=../obj/systemModulePopulator-py/System_.py
GENERATED_SYSTEM_MODULE_TARGET=System_.py
GENERATED_SYSTEM_MODULE_TARGET=src/System_/__init__.py

VIRTUALENV = venv

all: check-system-module

Expand All @@ -15,3 +17,19 @@ check-system-module: build-system-module

update-system-module: build-system-module
cp $(GENERATED_SYSTEM_MODULE_SOURCE) $(GENERATED_SYSTEM_MODULE_TARGET)

setup-venv:
python -m venv --clear $(VIRTUALENV)
$(VIRTUALENV)/bin/pip install --upgrade build twine

clean-package:
rm -rf dist/

build-package:
$(VIRTUALENV)/bin/python -m build

upload-package-testpypi:
$(VIRTUALENV)/bin/python -m twine upload --repository testpypi dist/*

upload-package-pypi:
$(VIRTUALENV)/bin/python -m twine upload dist/*
21 changes: 21 additions & 0 deletions Source/DafnyRuntime/DafnyRuntimePython/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "DafnyRuntimePython"
version = "4.7.0"
authors = [
{ name = "The Dafny core team", email = "core-team@dafny.org" },
]
description = "Dafny runtime for Python"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]

[project.urls]
Homepage = "https://github.com/dafny-lang/dafny"
Issues = "https://github.com/dafny-lang/dafny/issues"
Loading