Skip to content

Commit

Permalink
Fix version handling, revert default psycopg to version 2, add option…
Browse files Browse the repository at this point in the history
…al psycopg3
  • Loading branch information
Wiktor Latanowicz committed Apr 25, 2023
1 parent c598b88 commit 0c5cf4a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements/extras/postgres.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
psycopg[binary]
psycopg2-binary
1 change: 1 addition & 0 deletions requirements/extras/psycopg3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
psycopg[binary]>=3.0
15 changes: 11 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from pathlib import Path
from os import path

from setuptools import find_packages, setup

BUNDLES = (
"kafka",
"memcached",
"mysql",
"psycopg3",
"postgres",
"rabbitmq",
"redis",
Expand Down Expand Up @@ -48,8 +50,13 @@ def extras_require():
return {x: extras(x + ".txt") for x in BUNDLES}


with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
def get_long_description():
with open(path.join(path.dirname(__file__), "README.md"), "r", encoding="utf-8") as fh:
return fh.read()

def get_version():
with open(path.join(path.dirname(__file__), "wait_for_dep", "VERSION"), "r", encoding="utf-8") as f:
return f.read().strip()


setup(
Expand All @@ -59,13 +66,13 @@ def extras_require():
"wait-for-dep = wait_for_dep.wait_for_dep:main",
],
},
version="0.4.1",
version=get_version(),
description="Waits for dependencies before running the app",
url="http://github.com/wlatanowicz/wait-for-dep",
author="Wiktor Latanowicz",
author_email="wait-for-dep@wiktor.latanowicz.com",
license="MIT",
long_description=long_description,
long_description=get_long_description(),
long_description_content_type="text/markdown",
packages=find_packages(
exclude=[
Expand Down
1 change: 1 addition & 0 deletions wait_for_dep/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1-dev
4 changes: 4 additions & 0 deletions wait_for_dep/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from os import path

with open(path.join(path.dirname(__file__), "VERSION"), encoding="utf-8") as f:
__version__ = f.read().strip()

0 comments on commit 0c5cf4a

Please sign in to comment.