summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert JW Regeer <xistence@0x58.com>2022-05-15 20:16:25 -0600
committerGitHub <noreply@github.com>2022-05-15 20:16:25 -0600
commitac91794dfb7617b473c9d06d04900debfcdf585e (patch)
treede311f1e71d5306a9499e230a9537c2a530cc66f
parentee1d364dabd544fe4bf355b2c6578e4237b03992 (diff)
parentd73a3389898cb18f5def996c252c494e6ad1966a (diff)
downloadpastedeploy-git-ac91794dfb7617b473c9d06d04900debfcdf585e.tar.gz
Merge pull request #35 from Pylons/src-folder
-rw-r--r--.coveragerc13
-rw-r--r--.github/workflows/ci-tests.yml24
-rw-r--r--.gitignore3
-rw-r--r--MANIFEST.in15
-rw-r--r--docs/news.rst5
-rw-r--r--pytest.ini5
-rw-r--r--setup.cfg13
-rw-r--r--src/paste/__init__.py (renamed from paste/__init__.py)0
-rw-r--r--src/paste/deploy/__init__.py (renamed from paste/deploy/__init__.py)0
-rw-r--r--src/paste/deploy/config.py (renamed from paste/deploy/config.py)0
-rw-r--r--src/paste/deploy/converters.py (renamed from paste/deploy/converters.py)0
-rw-r--r--src/paste/deploy/loadwsgi.py (renamed from paste/deploy/loadwsgi.py)0
-rw-r--r--src/paste/deploy/paster_templates.py (renamed from paste/deploy/paster_templates.py)0
-rw-r--r--src/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl (renamed from paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl)0
-rw-r--r--src/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl (renamed from paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl)0
-rw-r--r--src/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl (renamed from paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl)0
-rw-r--r--src/paste/deploy/util.py (renamed from paste/deploy/util.py)0
-rw-r--r--tox.ini57
18 files changed, 108 insertions, 27 deletions
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..1dec06f
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,13 @@
+[run]
+source =
+ paste.deploy
+
+[paths]
+source =
+ paste/deploy
+ */paste/deploy
+ */site-packages/paste/deploy
+
+[report]
+show_missing = true
+precision = 2
diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml
index 92231fe..7ada44c 100644
--- a/.github/workflows/ci-tests.yml
+++ b/.github/workflows/ci-tests.yml
@@ -70,15 +70,15 @@ jobs:
architecture: x64
- run: pip install tox
- run: tox -e docs
- # lint:
- # runs-on: ubuntu-latest
- # name: Lint the package
- # steps:
- # - uses: actions/checkout@v2
- # - name: Setup python
- # uses: actions/setup-python@v2
- # with:
- # python-version: "3.10"
- # architecture: x64
- # - run: pip install tox
- # - run: tox -e lint
+ lint:
+ runs-on: ubuntu-latest
+ name: Lint the package
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup python
+ uses: actions/setup-python@v2
+ with:
+ python-version: "3.10"
+ architecture: x64
+ - run: pip install tox
+ - run: tox -e lint
diff --git a/.gitignore b/.gitignore
index 57d7cfa..fd8adfe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,8 @@
.coverage
+.coverage.*
.tox
*.pyc
-PasteDeploy.egg-info
+src/PasteDeploy.egg-info
coverage.xml
htmlcov
.eggs
diff --git a/MANIFEST.in b/MANIFEST.in
index 938fb5c..1108a6c 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,14 +1,21 @@
-graft .github
+graft src/paste
graft tests
-graft paste/deploy/paster_templates
+graft docs
+graft .github
-include docs/*.txt
+include setup.cfg
+include README.rst
+include contributing.md
include license.txt
+include .coveragerc
include pytest.ini
include tox.ini
include rtd.txt
include pyproject.toml
-include contributing.md
+
+prune docs/_build
+prune docs/_themes
+prune tests/fake_packages/FakeApp.egg/EGG-INFO
global-exclude __pycache__ *.py[cod]
global-exclude .DS_Store
diff --git a/docs/news.rst b/docs/news.rst
index b827317..05d8f9f 100644
--- a/docs/news.rst
+++ b/docs/news.rst
@@ -6,6 +6,11 @@ unreleased
* Drop support for Python 2, as well as 3.4, 3.5, and 3.6.
+* Fix a broken compatibility shim that would cause the ConfigParser to fail
+ on Python 3.12 when ``ConfigParser.readfp`` is removed.
+
+* Refactor repository into a src folder layout.
+
2.1.1 (2020-10-12)
------------------
diff --git a/pytest.ini b/pytest.ini
index 5ee6477..4b9d6ae 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,2 +1,5 @@
[pytest]
-testpaths = tests
+python_files = test_*.py
+testpaths =
+ tests
+addopts = -W always --cov
diff --git a/setup.cfg b/setup.cfg
index 1544721..4d81c86 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -39,6 +39,8 @@ project_urls =
Issue Tracker = https://github.com/Pylons/pastedeploy/issues
[options]
+package_dir =
+ =src
packages = find:
zip_safe = False
install_requires =
@@ -48,8 +50,7 @@ namespace_packages =
paste
[options.packages.find]
-exclude =
- tests
+where = src
[options.extras_require]
config =
@@ -58,6 +59,10 @@ paste =
docs =
Sphinx >= 1.7.5
pylons-sphinx-themes
+testing =
+ Paste
+ pytest
+ pytest-cov
[options.entry_points]
paste.filter_app_factory =
@@ -66,3 +71,7 @@ paste.filter_app_factory =
paste.paster_create_template =
paste_deploy = paste.deploy.paster_templates:PasteDeploy
+
+[check-manifest]
+ignore-bad-ideas =
+ tests/fake_packages/**
diff --git a/paste/__init__.py b/src/paste/__init__.py
index cdb6121..cdb6121 100644
--- a/paste/__init__.py
+++ b/src/paste/__init__.py
diff --git a/paste/deploy/__init__.py b/src/paste/deploy/__init__.py
index 94c63a8..94c63a8 100644
--- a/paste/deploy/__init__.py
+++ b/src/paste/deploy/__init__.py
diff --git a/paste/deploy/config.py b/src/paste/deploy/config.py
index f448350..f448350 100644
--- a/paste/deploy/config.py
+++ b/src/paste/deploy/config.py
diff --git a/paste/deploy/converters.py b/src/paste/deploy/converters.py
index 30a3290..30a3290 100644
--- a/paste/deploy/converters.py
+++ b/src/paste/deploy/converters.py
diff --git a/paste/deploy/loadwsgi.py b/src/paste/deploy/loadwsgi.py
index c5471e5..c5471e5 100644
--- a/paste/deploy/loadwsgi.py
+++ b/src/paste/deploy/loadwsgi.py
diff --git a/paste/deploy/paster_templates.py b/src/paste/deploy/paster_templates.py
index edfa97a..edfa97a 100644
--- a/paste/deploy/paster_templates.py
+++ b/src/paste/deploy/paster_templates.py
diff --git a/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl b/src/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl
index 5514cfc..5514cfc 100644
--- a/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl
+++ b/src/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl
diff --git a/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl b/src/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl
index 5684c31..5684c31 100644
--- a/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl
+++ b/src/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl
diff --git a/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl b/src/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl
index 0c0ae35..0c0ae35 100644
--- a/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl
+++ b/src/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl
diff --git a/paste/deploy/util.py b/src/paste/deploy/util.py
index d30466a..d30466a 100644
--- a/paste/deploy/util.py
+++ b/src/paste/deploy/util.py
diff --git a/tox.ini b/tox.ini
index 4046d48..8df803b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,20 +1,63 @@
[tox]
envlist =
py37,py38,py39,py310,pypy3,
+ coverage,
docs
+isolated_build = True
[testenv]
-deps =
- # Paste works on Python 3 since Paste 2.0
- Paste
- pytest
- pytest-cov
commands =
- py.test --cov=paste/deploy --cov-report=xml --cov-report=html --cov-report=term-missing {posargs}
+ python --version
+ pytest {posargs:}
+extras =
+ testing
+setenv =
+ COVERAGE_FILE=.coverage.{envname}
+
+[testenv:coverage]
+commands =
+ coverage combine
+ coverage xml
+ coverage report --fail-under=100
+deps =
+ coverage
+setenv =
+ COVERAGE_FILE=.coverage
[testenv:docs]
whitelist_externals = make
commands =
- make -C docs html epub BUILDDIR={envdir} "SPHINXOPTS=-W -E"
+ make -C docs html epub BUILDDIR={envdir}
extras =
docs
+
+[testenv:lint]
+skip_install = True
+commands =
+ check-manifest
+ # build sdist/wheel
+ python -m build .
+ twine check dist/*
+deps =
+ build
+ check-manifest
+ readme_renderer
+ twine
+
+[testenv:build]
+skip_install = True
+commands =
+ # clean up build/ and dist/ folders
+ python -c 'import shutil; shutil.rmtree("build", ignore_errors=True)'
+ # Make sure we aren't forgetting anything
+ check-manifest
+ # build sdist/wheel
+ python -m build .
+ # Verify all is well
+ twine check dist/*
+
+deps =
+ build
+ check-manifest
+ readme_renderer
+ twine