Skip to content

Commit c4b801e

Browse files
committed
Merge branch 'develop' into doc
2 parents 979f01b + 5ddcf5e commit c4b801e

14 files changed

+316
-123
lines changed

.github/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
enum34 ; python_version == '2.7'
2-
pathlib ; python_version == '2.7'
1+
distutils-pytest
2+
git-props
33
pytest >=3.7.0
4-
setuptools_scm
4+
setuptools
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish
2+
on:
3+
release:
4+
types:
5+
- published
6+
jobs:
7+
PyPI:
8+
name: publish release to PyPI
9+
runs-on: ubuntu-latest
10+
environment: release
11+
permissions:
12+
id-token: write
13+
env:
14+
SDIST: pytest-dependency-${{ github.event.release.tag_name }}.tar.gz
15+
steps:
16+
- name: Fetch assets
17+
uses: cb80/dlassets@latest
18+
with:
19+
tag: ${{ github.event.release.tag_name }}
20+
to: assets
21+
- name: Check assets
22+
run: |
23+
ls -la assets
24+
- name: Copy distfile to dist directory
25+
run: |
26+
mkdir -p dist
27+
cp -p assets/$SDIST dist
28+
- name: Upload distfile to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/run-tests.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,28 @@ jobs:
66
strategy:
77
matrix:
88
python-version:
9-
- '2.7'
10-
- '3.5'
11-
- '3.6'
129
- '3.7'
1310
- '3.8'
1411
- '3.9'
1512
- '3.10'
13+
- '3.11'
14+
- '3.12'
1615
os: [ubuntu-latest]
16+
include:
17+
- python-version: '3.6'
18+
os: ubuntu-20.04
1719
steps:
1820
- name: Check out repository code
19-
uses: actions/checkout@v2
21+
uses: actions/checkout@v4
2022
with:
2123
fetch-depth: 0
2224
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v4
2426
with:
2527
python-version: ${{ matrix.python-version }}
2628
- name: Install dependencies
2729
run: |
2830
pip install -r .github/requirements.txt
29-
- name: Build
30-
run: |
31-
python setup.py build
3231
- name: Test with pytest
3332
run: |
34-
export PYTHONPATH=$(pwd)/build/lib
35-
python -m pytest tests
33+
python setup.py test

.gitignore

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
*.pyc
2-
*~
3-
.cache/
41
__pycache__/
5-
/.version
2+
/.env
63
/MANIFEST
4+
/_meta.py
75
/build/
86
/dist/
9-
/doc/doctest/
10-
/doc/doctrees/
11-
/doc/html/
12-
/doc/latex/
13-
/doc/linkcheck/
14-
/pytest_dependency.egg-info/
15-
/python2_6.patch

.readthedocs.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-22.04
8+
tools:
9+
python: "3.12"
10+
jobs:
11+
post_checkout:
12+
- git fetch --unshallow
13+
post_install:
14+
- python setup.py build
15+
16+
sphinx:
17+
configuration: doc/src/conf.py
18+
19+
python:
20+
install:
21+
- requirements: .rtd-require

.rtd-require

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
git-props
2+
pytest >=3.7.0
3+
setuptools
4+
sphinx_rtd_theme

CHANGES.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Changelog
44
dev (not yet released)
55
~~~~~~~~~~~~~~~~~~~~~~
66

7+
Incompatible changes
8+
--------------------
9+
10+
+ Drop support for Python 2.
11+
712
Bug fixes and minor changes
813
---------------------------
914

@@ -12,10 +17,16 @@ Bug fixes and minor changes
1217
+ `#58`_: declare the type of automark_dependency ini-option correctly
1318
as bool.
1419

20+
Internal
21+
--------
22+
23+
+ `#75`_: review build tool chain.
24+
1525
.. _#40: https://github.com/RKrahl/pytest-dependency/issues/40
1626
.. _#50: https://github.com/RKrahl/pytest-dependency/issues/50
1727
.. _#51: https://github.com/RKrahl/pytest-dependency/pull/51
1828
.. _#58: https://github.com/RKrahl/pytest-dependency/pull/58
29+
.. _#75: https://github.com/RKrahl/pytest-dependency/pull/75
1930

2031
0.5.1 (2020-02-14)
2132
~~~~~~~~~~~~~~~~~~

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
include .version
21
include CHANGES.rst
32
include LICENSE.txt
43
include MANIFEST.in
54
include README.rst
5+
include _meta.py
66
include doc/examples/*.py
77
include tests/conftest.py
88
include tests/pytest.ini

Makefile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ BUILDLIB = $(CURDIR)/build/lib
55
build:
66
$(PYTHON) setup.py build
77

8-
test: build
9-
PYTHONPATH=$(BUILDLIB) $(PYTHON) -m pytest tests
8+
test:
9+
$(PYTHON) setup.py test
1010

1111
sdist:
1212
$(PYTHON) setup.py sdist
@@ -15,16 +15,17 @@ doc-html: build
1515
$(MAKE) -C doc html PYTHONPATH=$(BUILDLIB)
1616

1717
clean:
18-
rm -f *~ tests/*~
1918
rm -rf build
19+
rm -rf __pycache__
2020

2121
distclean: clean
22-
rm -rf .cache tests/.cache .pytest_cache tests/.pytest_cache
23-
rm -f *.pyc tests/*.pyc
24-
rm -rf __pycache__ tests/__pycache__
25-
rm -f MANIFEST .version
22+
rm -f MANIFEST _meta.py
2623
rm -rf dist
27-
rm -rf pytest_dependency.egg-info
24+
rm -rf tests/.pytest_cache
2825
$(MAKE) -C doc distclean
2926

30-
.PHONY: build test sdist doc-html clean distclean
27+
meta:
28+
$(PYTHON) setup.py meta
29+
30+
31+
.PHONY: build test sdist doc-html clean distclean meta

README.rst

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,23 @@ The latest release version can be found `at PyPI`__.
3131
System requirements
3232
-------------------
3333

34-
+ Python 2.7 or 3.4 and newer.
34+
+ Python 3.4 and newer.
3535
+ `setuptools`_.
3636
+ `pytest`_ 3.7.0 or newer.
3737

3838
Optional library packages:
3939

40-
+ `setuptools_scm`_
40+
+ `git-props`_
4141

42-
The version number is managed using this package. All source
43-
distributions add a static text file with the version number and
44-
fall back using that if `setuptools_scm` is not available. So this
45-
package is only needed to build out of the plain development source
46-
tree as cloned from GitHub.
42+
This package is used to extract some metadata such as the version
43+
number out of git, the version control system. All releases embed
44+
that metadata in the distribution. So this package is only needed
45+
to build out of the plain development source tree as cloned from
46+
GitHub, but not to build a release distribution.
47+
48+
+ `distutils-pytest`_ >= 0.2
49+
50+
Only needed to run the test suite.
4751

4852

4953
Installation
@@ -57,7 +61,7 @@ Installation
5761

5862
3. Test (optional)::
5963

60-
$ PYTHONPATH=build/lib python -m pytest tests
64+
$ python setup.py test
6165

6266
4. Install::
6367

@@ -98,6 +102,7 @@ permissions and limitations under the License.
98102
.. _PyPI site: https://pypi.org/project/pytest-dependency/
99103
.. _setuptools: http://pypi.python.org/pypi/setuptools/
100104
.. _pytest: http://pytest.org/
101-
.. _setuptools_scm: https://github.com/pypa/setuptools_scm/
105+
.. _git-props: https://github.com/RKrahl/git-props
106+
.. _distutils-pytest: https://github.com/RKrahl/distutils-pytest
102107
.. _Read the Docs site: https://pytest-dependency.readthedocs.io/
103108
.. _Apache License: https://www.apache.org/licenses/LICENSE-2.0

0 commit comments

Comments
 (0)