organize py module

This commit is contained in:
Kenneth Bingham 2025-03-04 15:54:00 -05:00
parent 26d1f34f4e
commit fd2b1f12b2
No known key found for this signature in database
GPG Key ID: 31709281860130B6
24 changed files with 21 additions and 16 deletions

1
.gitignore vendored
View File

@ -40,3 +40,4 @@ sdk/nodejs/sdk/dist
# py module artifacts
*.egg-info/
__pycache__/

View File

@ -59,14 +59,15 @@ openapi-generator-cli generate -i specs/zrok.yml -o sdk/nodejs/sdk/src/api -g ty
echo "...generating python sdk client"
# Delete tracked Python files
while IFS= read -r file; do
if [ -f "sdk/python/sdk/zrok/$file" ]; then
echo "Removing existing file: sdk/python/sdk/zrok/$file"
rm -f "sdk/python/sdk/zrok/$file"
if [ -f "sdk/python/src/$file" ]; then
echo "Removing existing file: sdk/python/src/$file"
rm -f "sdk/python/src/$file"
fi
done < sdk/python/sdk/zrok/.openapi-generator/FILES
done < sdk/python/src/.openapi-generator/FILES
# Delete the tracking file
rm -f sdk/python/sdk/zrok/.openapi-generator/FILES
rm -f sdk/python/src/.openapi-generator/FILES
# Generate and track new files
openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/sdk/zrok --package-name zrok_api --additional-properties projectName=zrok -g python
openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/src/zrok -g python \
--package-name zrok_api --additional-properties projectName=zrok
git checkout rest_server_zrok/configure_zrok.go

View File

@ -1 +0,0 @@
3.0.51

View File

@ -1,8 +1,8 @@
[metadata]
name = openziti
author = OpenZiti Developers
name = zrok
author = NetFoundry
author_email = developers@openziti.org
description = Ziti Python SDK
description = zrok Python SDK
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/openziti/zrok
@ -13,11 +13,13 @@ project_urls =
Discussion = https://openziti.discourse.group/
[options]
package_dir = # this is a dict definition meaning there's no special mapping, and
"" = . # continues on this line to specify finding packages in the current directory
packages = find: # include all packages found
# Find packages in the current directory with no special mapping
package_dir =
= .
packages = find:
[options.packages.find]
# exclude none
where = .
[flake8]

View File

@ -7,13 +7,14 @@ import re
NAME = os.getenv('ZROK_PY_NAME', "zrok")
VERSION = "1.0.0"
# Define your package overrides here - these take precedence over the generated requirements.txt
OVERRIDES = {
# Override specific packages with version constraints different from the generated requirements.txt
"openziti": "openziti >= 1.0.0",
"urllib3": "urllib3 >= 2.1.0", # urllib3 2.1.0 introduced breaking changes that are implemented by openapi-generator 7.12.0
# urllib3 2.1.0 introduced breaking changes that are implemented by openapi-generator 7.12.0
"urllib3": "urllib3 >= 2.1.0",
}
# Parse the generated requirements.txt
def parse_requirements(filename):
requirements = []
@ -37,6 +38,7 @@ def parse_requirements(filename):
return requirements
# Combine requirements from requirements.txt and overrides
requirements_file = Path(__file__).parent / "requirements.txt"
REQUIRES = parse_requirements(requirements_file) + list(OVERRIDES.values())