-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
59 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,42 @@ | ||
import os | ||
import sys | ||
|
||
from setuptools import setup | ||
|
||
# Retrieve 'VERSION' environment variable, default to '0.0' if not found. | ||
version = os.getenv('RELEASE_VERSION', '0.0') | ||
version_file = 'polypheny-connector-version.txt' | ||
|
||
if not os.path.exists(version_file): | ||
raise ValueError(f"Version file '{version_file}' not found. Please create the file with the version number.") | ||
|
||
with open(version_file, 'r') as f: | ||
version = f.read().strip() | ||
|
||
print(f"Building version: {version}") | ||
|
||
if not version.startswith('v'): | ||
raise ValueError(f"Invalid version format: {version}. Expected format 'v0.0.0'.") | ||
|
||
# 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 | ||
# Strip the 'v' prefix for the version | ||
version = version[1:] | ||
|
||
with open('README.md', 'r', encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
setup(name='polypheny', | ||
version=version, | ||
description='Driver for Polypheny', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
packages=['polypheny'], | ||
install_requires=[ | ||
"polypheny-prism-api==1.9", | ||
], | ||
) | ||
setup( | ||
name='polypheny', | ||
version=version, | ||
description='Driver for Polypheny', | ||
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/drivers/python/overview", | ||
"Code": "https://github.com/polypheny/Polypheny-Connector-Python", | ||
"Issue tracker": "https://github.com/polypheny/Polypheny-DB/labels/A-python" | ||
}, | ||
license="Apache License, Version 2.0", | ||
packages=['polypheny'], | ||
install_requires=[ | ||
"polypheny-prism-api==1.9", | ||
], | ||
) |