Skip to content

Commit 0c5cf4a

Browse files
author
Wiktor Latanowicz
committed
Fix version handling, revert default psycopg to version 2, add optional psycopg3
1 parent c598b88 commit 0c5cf4a

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

requirements/extras/postgres.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
psycopg[binary]
1+
psycopg2-binary

requirements/extras/psycopg3.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
psycopg[binary]>=3.0

setup.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from pathlib import Path
2+
from os import path
23

34
from setuptools import find_packages, setup
45

56
BUNDLES = (
67
"kafka",
78
"memcached",
89
"mysql",
10+
"psycopg3",
911
"postgres",
1012
"rabbitmq",
1113
"redis",
@@ -48,8 +50,13 @@ def extras_require():
4850
return {x: extras(x + ".txt") for x in BUNDLES}
4951

5052

51-
with open("README.md", "r", encoding="utf-8") as fh:
52-
long_description = fh.read()
53+
def get_long_description():
54+
with open(path.join(path.dirname(__file__), "README.md"), "r", encoding="utf-8") as fh:
55+
return fh.read()
56+
57+
def get_version():
58+
with open(path.join(path.dirname(__file__), "wait_for_dep", "VERSION"), "r", encoding="utf-8") as f:
59+
return f.read().strip()
5360

5461

5562
setup(
@@ -59,13 +66,13 @@ def extras_require():
5966
"wait-for-dep = wait_for_dep.wait_for_dep:main",
6067
],
6168
},
62-
version="0.4.1",
69+
version=get_version(),
6370
description="Waits for dependencies before running the app",
6471
url="http://github.com/wlatanowicz/wait-for-dep",
6572
author="Wiktor Latanowicz",
6673
author_email="[email protected]",
6774
license="MIT",
68-
long_description=long_description,
75+
long_description=get_long_description(),
6976
long_description_content_type="text/markdown",
7077
packages=find_packages(
7178
exclude=[

wait_for_dep/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1-dev

wait_for_dep/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from os import path
2+
3+
with open(path.join(path.dirname(__file__), "VERSION"), encoding="utf-8") as f:
4+
__version__ = f.read().strip()

0 commit comments

Comments
 (0)