Skip to content
Merged
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
33 changes: 29 additions & 4 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,42 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Apache Maven Central
uses: actions/setup-java@v3
with: # configure settings.xml
distribution: 'temurin'
java-version: '11'
server-id: ossrh
server-username: OSSRH_USER
server-password: OSSRH_PASSWORD

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies

- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install build
python -m pip install poetry

- name: Install dependencies
run: |
poetry install

- name: Run prebuild script
run: |
cd scripts
# Run the script within the Poetry virtual environment
poetry run python pull_and_compile_protos.py


- name: Build package
run: python -m build
run: poetry build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
.vscode
.coverage
target
**/proto
**/proto
poetry.lock
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[tool.poetry]
name = "up-python"
version = "0.1.0-dev"
description = "Language specific uProtocol library for building and using UUri, UUID, UAttributes, UTransport, and more."
authors = ["Neelam Kushwah <neelam.kushwah@gm.com>"]
license = "The Apache License, Version 2.0"
readme = "README.adoc"
repository = "https://github.com/eclipse-uprotocol/up-python"
packages = [{ include = "uprotocol" },
{ include = "tests" },
{ include = "scripts" }

]

[tool.poetry.dependencies]
python = "^3.8"
cloudevents = "*"
multipledispatch = "*"
gitpython = ">=3.1.41"
googleapis-common-protos = ">=1.56.4"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"



Empty file added scripts/__init__.py
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
from git import Repo

REPO_URL = "https://github.com/eclipse-uprotocol/up-core-api.git"
PROTO_REPO_DIR = "target"
PROTO_REPO_DIR = os.path.abspath("../target")
TAG_NAME = "uprotocol-core-api-1.5.6"
PROTO_OUTPUT_DIR = os.path.join("uprotocol", "proto")
PROTO_OUTPUT_DIR = os.path.abspath("../uprotocol/proto")


def clone_or_pull(repo_url, PROTO_REPO_DIR):
Expand Down
18 changes: 0 additions & 18 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.