Skip to content

Commit ba79a31

Browse files
pyproject.toml is used (#307)
setup.cfg, setup.py, MANIFEST.in were removed.
1 parent d362993 commit ba79a31

6 files changed

Lines changed: 62 additions & 69 deletions

File tree

MANIFEST.in

Lines changed: 0 additions & 8 deletions
This file was deleted.

pyproject.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools.package-dir]
6+
"testgres" = "src"
7+
8+
[tool.flake8]
9+
extend-ignore = ["E501"]
10+
exclude = [".git", "__pycache__", "env", "venv"]
11+
12+
[project]
13+
name = "testgres"
14+
version = "1.12.2"
15+
requires-python = ">=3.7.17"
16+
17+
description = "Testing utility for PostgreSQL and its extensions"
18+
readme = "README.md"
19+
20+
# [2026-01-05]
21+
# This old format is used to ensure compatibility with Python 3.7.
22+
license = {text = "PostgreSQL"}
23+
24+
authors = [
25+
{name = "Postgres Professional", email = "testgres@postgrespro.ru"},
26+
]
27+
28+
keywords = [
29+
'test',
30+
'testing',
31+
'postgresql',
32+
]
33+
34+
dependencies = [
35+
"pg8000",
36+
"port-for>=0.4",
37+
"six>=1.9.0",
38+
"psutil",
39+
"packaging",
40+
"testgres.os_ops>=1.0.0,<2.0.0",
41+
]
42+
43+
[project.urls]
44+
"HomePage" = "https://github.com/postgrespro/testgres"

run_tests.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,43 +19,47 @@ virtualenv --python="/usr/bin/python${PYTHON_VERSION}" "${VENV_PATH}"
1919
export VIRTUAL_ENV_DISABLE_PROMPT=1
2020
source "${VENV_PATH}/bin/activate"
2121
pip install -r tests/requirements.txt
22-
pip install coverage flake8 Sphinx
2322

2423
# install testgres' dependencies
2524
export PYTHONPATH=$(pwd)
2625
# $PIP install .
2726

2827
# test code quality
28+
pip install flake8 flake8-pyproject
2929
flake8 .
30-
30+
pip uninstall -y flake8 flake8-pyproject
3131

3232
# remove existing coverage file
3333
export COVERAGE_FILE=.coverage
3434
rm -f $COVERAGE_FILE
3535

36+
pip install coverage
3637

3738
# run tests (PATH)
3839
time coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"
3940

40-
4141
# run tests (PG_BIN)
4242
PG_BIN=$(pg_config --bindir) \
4343
time coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"
4444

45-
4645
# run tests (PG_CONFIG)
4746
PG_CONFIG=$(pg_config --bindir)/pg_config \
4847
time coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"
4948

50-
5149
# show coverage
5250
coverage report
5351

52+
pip uninstall -y coverage
53+
5454
# build documentation
55+
pip install Sphinx
56+
5557
cd docs
5658
make html
5759
cd ..
5860

61+
pip uninstall -y Sphinx
62+
5963
# attempt to fix codecov
6064
set +eux
6165

run_tests2.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,43 +25,47 @@ python -m venv "${VENV_PATH}"
2525
export VIRTUAL_ENV_DISABLE_PROMPT=1
2626
source "${VENV_PATH}/bin/activate"
2727
pip install -r tests/requirements.txt
28-
pip install coverage flake8 Sphinx
2928

3029
# install testgres' dependencies
3130
export PYTHONPATH=$(pwd)
3231
# $PIP install .
3332

3433
# test code quality
34+
pip install flake8 flake8-pyproject
3535
flake8 .
36-
36+
pip uninstall -y flake8 flake8-pyproject
3737

3838
# remove existing coverage file
3939
export COVERAGE_FILE=.coverage
4040
rm -f $COVERAGE_FILE
4141

42+
pip install coverage
4243

4344
# run tests (PATH)
4445
time coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"
4546

46-
4747
# run tests (PG_BIN)
4848
PG_BIN=$(pg_config --bindir) \
4949
time coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"
5050

51-
5251
# run tests (PG_CONFIG)
5352
PG_CONFIG=$(pg_config --bindir)/pg_config \
5453
time coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"
5554

56-
5755
# show coverage
5856
coverage report
5957

58+
pip uninstall -y coverage
59+
6060
# build documentation
61+
pip install Sphinx
62+
6163
cd docs
6264
make html
6365
cd ..
6466

67+
pip uninstall -y Sphinx
68+
6569
# attempt to fix codecov
6670
set +eux
6771

setup.cfg

Lines changed: 0 additions & 6 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)