Skip to content

Commit

Permalink
Improve python package
Browse files Browse the repository at this point in the history
  • Loading branch information
vogti committed May 17, 2024
1 parent 37c114d commit 78996a8
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
# Retrieve 'VERSION' environment variable, default to '0.0' if not found.
version = os.getenv('VERSION', '0.0')

print(f"Building version: {version}")

if version == '0.0':
raise ValueError("Version not set or defaulting to '0.0'. Please set the VERSION environment variable.")

# Attempt to split the version number, default to '0' for both if it fails
try:
major, minor = version.split('.')
except ValueError:
major, minor = '0', '0' # Default to '0.0' if the version isn't in a 'major.minor' format
raise ValueError(f"Invalid version format: {version}. Expected 'major.minor' format.")


with open('org/polypheny/prism/version.py', 'w') as f:
Expand All @@ -26,8 +31,16 @@
description='Polypheny Prism API files for Python',
long_description=long_description,
long_description_content_type='text/markdown',
author="The Polypheny Project",
author_email="[email protected]",
url="https://polypheny.com/",
project_urls={
"Documentation": "https://docs.polypheny.com/en/latest/query_interfaces/prism/protocol",
"Code": "https://github.com/polypheny/Polypheny-Prism-API"
},
license="Apache License, Version 2.0",
packages=['org/polypheny/prism'],
install_requires=[
"protobuf==4.24.3",
],
)
)

0 comments on commit 78996a8

Please sign in to comment.