Skip to content

Commit

Permalink
added setup info
Browse files Browse the repository at this point in the history
  • Loading branch information
hennlo committed May 18, 2024
1 parent efe32aa commit f716bf5
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
runs-on: ubuntu-latest
needs: build-polypheny
steps:
- name: Set stroe env variable
- name: Set store env variable
run: |
echo "DEFAULT_STORE=${{ matrix.adapter }}" >> $GITHUB_ENV
- uses: actions/setup-python@v5
Expand Down
60 changes: 50 additions & 10 deletions setup.py
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]",
Expand All @@ -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",
],
Expand Down

0 comments on commit f716bf5

Please sign in to comment.