Skip to content

Commit 78996a8

Browse files
committed
Improve python package
1 parent 37c114d commit 78996a8

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

setup.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@
66
# Retrieve 'VERSION' environment variable, default to '0.0' if not found.
77
version = os.getenv('VERSION', '0.0')
88

9+
print(f"Building version: {version}")
10+
11+
if version == '0.0':
12+
raise ValueError("Version not set or defaulting to '0.0'. Please set the VERSION environment variable.")
13+
914
# Attempt to split the version number, default to '0' for both if it fails
1015
try:
1116
major, minor = version.split('.')
1217
except ValueError:
13-
major, minor = '0', '0' # Default to '0.0' if the version isn't in a 'major.minor' format
18+
raise ValueError(f"Invalid version format: {version}. Expected 'major.minor' format.")
1419

1520

1621
with open('org/polypheny/prism/version.py', 'w') as f:
@@ -26,8 +31,16 @@
2631
description='Polypheny Prism API files for Python',
2732
long_description=long_description,
2833
long_description_content_type='text/markdown',
34+
author="The Polypheny Project",
35+
author_email="[email protected]",
36+
url="https://polypheny.com/",
37+
project_urls={
38+
"Documentation": "https://docs.polypheny.com/en/latest/query_interfaces/prism/protocol",
39+
"Code": "https://github.com/polypheny/Polypheny-Prism-API"
40+
},
41+
license="Apache License, Version 2.0",
2942
packages=['org/polypheny/prism'],
3043
install_requires=[
3144
"protobuf==4.24.3",
3245
],
33-
)
46+
)

0 commit comments

Comments
 (0)