-
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
2 changed files
with
51 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,62 @@ | ||
import os | ||
from setuptools import setup | ||
import sys | ||
from setuptools import setup, find_packages | ||
|
||
THIS_DIR = os.path.dirname(os.path.realpath(__file__)) | ||
CONNECTOR_SRC_DIR = os.path.join(THIS_DIR, "polypheny") | ||
|
||
VERSION = (1, 1, 1, None) # Default | ||
VERSION = "v1.1.1" # Default | ||
|
||
|
||
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.") | ||
# necessary for automated build pipeline | ||
if os.path.exists(version_file): | ||
with open(version_file, 'r') as f: | ||
version = f.read().strip() | ||
|
||
else: | ||
version = VERSION | ||
#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}") | ||
#print(f"Building version: {version}") | ||
|
||
if not version.startswith('v'): | ||
raise ValueError(f"Invalid version format: {version}. Expected format 'v0.0.0'.") | ||
|
||
# Strip the 'v' prefix for the version | ||
version = version[1:] | ||
|
||
with open('README.md', 'r', encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
### Parse command line flags | ||
|
||
# This list defines the options definitions in a set | ||
options_def = { | ||
"--debug", | ||
} | ||
|
||
# Options is the final parsed command line options | ||
options = {e.lstrip("-"): False for e in options_def} | ||
|
||
|
||
for flag in options_def: | ||
if flag in sys.argv: | ||
options[flag.lstrip("-")] = True | ||
sys.argv.remove(flag) | ||
|
||
|
||
def readme(): | ||
with open(os.path.join(THIS_DIR, 'README.md'), encoding="utf-8" ) as f: | ||
return f.read() | ||
|
||
|
||
setup( | ||
name='polypheny', | ||
version=version, | ||
description='Driver for Polypheny', | ||
long_description=long_description, | ||
long_description=readme(), | ||
long_description_content_type='text/markdown', | ||
author="The Polypheny Project", | ||
author_email="[email protected]", | ||
|
@@ -35,7 +67,15 @@ | |
"Issue tracker": "https://github.com/polypheny/Polypheny-DB/labels/A-python" | ||
}, | ||
license="Apache License, Version 2.0", | ||
packages=['polypheny'], | ||
packages=find_packages(), | ||
include_package_data=True, | ||
command_options={ | ||
'build_sphinx': { | ||
'version': ('setup.py', version), | ||
'release': ('setup.py', version), | ||
}, | ||
}, | ||
python_requires=">=3.8", | ||
install_requires=[ | ||
"polypheny-prism-api==1.9", | ||
], | ||
|