Skip to content

Commit 286e040

Browse files
authored
Release 1.8.0 (#241)
* Updated the CHANGES.md to include everything since 1.8.0 (including 1.7.1!) * Removed more python 2 compat code * Added a long description to all packages, which is required for PyPI * Updated the version number to 1.8.0 * Fixed the build installing two separate Chrome versions * Releases to PyPI and GitHub when the version number increments on master
1 parent 01b3fb2 commit 286e040

File tree

19 files changed

+179
-53
lines changed

19 files changed

+179
-53
lines changed

.circleci/config.yml

Lines changed: 111 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
test-tmpl: &test-tmpl
33
command: |
4+
pwd
45
. ../venv/bin/activate
56
export DEBUG=1
67
export SERVER_FIXTURES_HOSTNAME=127.0.0.1
@@ -11,7 +12,7 @@ job-tmpl: &job-tmpl
1112
machine:
1213
image: ubuntu-2004:edge
1314

14-
working_directory: ~/src
15+
working_directory: /home/circleci/src
1516

1617
steps:
1718
- run: env
@@ -59,51 +60,51 @@ job-tmpl: &job-tmpl
5960
make develop
6061
- run:
6162
name: Run Tests - pytest-fixture-config
62-
working_directory: ~/src/pytest-fixture-config
63+
working_directory: /home/circleci/src/pytest-fixture-config
6364
<<: *test-tmpl
6465
- run:
6566
name: Run Tests - pytest-shutil
66-
working_directory: ~/src/pytest-shutil
67+
working_directory: /home/circleci/src/pytest-shutil
6768
<<: *test-tmpl
6869
- run:
6970
name: Run Tests - pytest-server-fixtures
70-
working_directory: ~/src/pytest-server-fixtures
71+
working_directory: /home/circleci/src/pytest-server-fixtures
7172
<<: *test-tmpl
7273
- run:
7374
name: Run Tests - pytest-pyramid-server
74-
working_directory: ~/src/pytest-pyramid-server
75+
working_directory: /home/circleci/src/pytest-pyramid-server
7576
<<: *test-tmpl
7677
- run:
7778
name: Run Tests - pytest-devpi-server
78-
working_directory: ~/src/pytest-devpi-server
79+
working_directory: /home/circleci/src/pytest-devpi-server
7980
<<: *test-tmpl
8081
- run:
8182
name: Run Tests - pytest-listener
82-
working_directory: ~/src/pytest-listener
83+
working_directory: /home/circleci/src/pytest-listener
8384
<<: *test-tmpl
8485
- run:
8586
name: Run Tests - pytest-svn
86-
working_directory: ~/src/pytest-svn
87+
working_directory: /home/circleci/src/pytest-svn
8788
<<: *test-tmpl
8889
- run:
8990
name: Run Tests - pytest-git
90-
working_directory: ~/src/pytest-git
91+
working_directory: /home/circleci/src/pytest-git
9192
<<: *test-tmpl
9293
- run:
9394
name: Run Tests - pytest-virtualenv
94-
working_directory: ~/src/pytest-virtualenv
95+
working_directory: /home/circleci/src/pytest-virtualenv
9596
<<: *test-tmpl
9697
- run:
9798
name: Run Tests - pytest-webdriver
98-
working_directory: ~/src/pytest-webdriver
99+
working_directory: /home/circleci/src/pytest-webdriver
99100
<<: *test-tmpl
100101
- run:
101102
name: Run Tests - pytest-profiling
102-
working_directory: ~/src/pytest-profiling
103+
working_directory: /home/circleci/src/pytest-profiling
103104
<<: *test-tmpl
104105
- run:
105106
name: Run Tests - pytest-verbose-parametrize
106-
working_directory: ~/src/pytest-verbose-parametrize
107+
working_directory: /home/circleci/src/pytest-verbose-parametrize
107108
<<: *test-tmpl
108109
- run:
109110
name: Archive Junit and Coverage
@@ -121,6 +122,31 @@ job-tmpl: &job-tmpl
121122
- run:
122123
name: Explode if tests have failed
123124
command: compgen -G FAILED-* && exit 1 || true
125+
- run:
126+
name: Build artifacts
127+
command: |
128+
. venv/bin/activate
129+
make wheels
130+
make sdists
131+
mkdir dist
132+
mv */dist/* dist
133+
- run:
134+
name: Move artifacts to workspace
135+
command: |
136+
mkdir -p /tmp/to-release/dist
137+
if [ "$PYTHON" = "python3.6" ]; then
138+
cp -r /home/circleci/src/dist /tmp/to-release/
139+
cp /home/circleci/src/VERSION /tmp/to-release/VERSION
140+
cp /home/circleci/src/CHANGES.md /tmp/to-release/CHANGES.md
141+
fi
142+
# Save artifacts. This is silly but wildcards aren't supported.
143+
- store_artifacts:
144+
path: /home/circleci/src/dist/
145+
- persist_to_workspace:
146+
root: /tmp/to-release/
147+
paths:
148+
- ./*
149+
- ./dist/*
124150

125151
version: 2
126152
jobs:
@@ -134,9 +160,81 @@ jobs:
134160
environment:
135161
PYTHON: "python3.7"
136162

163+
pypi-release:
164+
docker:
165+
- image: cimg/python:3.11.0
166+
steps:
167+
- attach_workspace:
168+
at: /tmp/to-release
169+
- run:
170+
name: Upload to TestPyPI
171+
command: | # install twine and publish to Test PyPI
172+
cd /tmp/to-release
173+
sudo add-apt-repository universe -y
174+
sudo apt-get update
175+
sudo apt install -y python3-pip
176+
sudo pip install pipenv
177+
pipenv install twine
178+
pipenv run twine upload --skip-existing --verbose dist/*
179+
180+
181+
publish-github-release:
182+
docker:
183+
- image: cibuilds/github:0.13
184+
steps:
185+
- attach_workspace:
186+
at: /tmp/to-release
187+
- run:
188+
name: Output useful stuff
189+
command: |
190+
cd /tmp/to-release/
191+
VERSION_FILE="/tmp/to-release/VERSION"
192+
if [ ! -f "$VERSION_FILE" ]; then
193+
echo "Error: Version file not found at $VERSION_FILE"
194+
exit 1
195+
fi
196+
VERSION=$(cat "$VERSION_FILE" | tr -d '[:space:]')
197+
if [ -z "$VERSION" ]; then
198+
echo "Error: Version file is empty"
199+
exit 1
200+
fi
201+
# Find the lines of the changelog between releases, escape double quotes, delete empty lines
202+
awk '/### '"$VERSION"'/,/^$/{print}' CHANGES.md | sed '1d;$d' > latest_changes.md
203+
- run:
204+
name: "Publish release on GitHub"
205+
command: |
206+
VERSION=$(cat /tmp/to-release/VERSION)
207+
CHANGES=$(cat /tmp/to-release/latest_changes.md)
208+
ghr -t ${GITHUB_TOKEN} \
209+
-u ${CIRCLE_PROJECT_USERNAME} \
210+
-r ${CIRCLE_PROJECT_REPONAME} \
211+
-c ${CIRCLE_SHA1} \
212+
-n ${VERSION} \
213+
-b "${CHANGES}" \
214+
-soft \
215+
${VERSION} /tmp/to-release/dist
216+
217+
137218
workflows:
138219
version: 2
139220
pytest-plugins:
140221
jobs:
141222
- py36
142223
- py37
224+
- pypi-release:
225+
requires:
226+
- py36
227+
- py37
228+
filters:
229+
branches:
230+
only:
231+
- master
232+
- publish-github-release:
233+
requires:
234+
- py36
235+
- py37
236+
filters:
237+
branches:
238+
only:
239+
- master
240+

CHANGES.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,39 @@
1-
21
## Changelog
3-
### 1.8.0
4-
* pytest-server-fixtures: Removed RethinkDB support.
5-
6-
### 1.7.0
2+
### 1.8.0 (2024-10-??)
3+
* All: Drop support for Python 2 and <3.6, removing compatibility code.
4+
* All: Use stdlib unittest.mock instead of mock package.
5+
* All: Removed usage of path.py and path in favour of pathlib. #174 #224
6+
* pytest-devpi-server: Run devpi-init for initialisation. #179
7+
* pytest-server-fixtures: BREAKING CHANGE: Removed RethinkDB support, as the project is no longer maintained.
8+
* pytest-server-fixtures: Allowed passing through HTTP headers to the server. #149
9+
* pytest-server-fixtures: Fixed threading log debug messages. #146
10+
* pytest-server-fixtures: Removed usage of deprecated Thread.setDaemon. #202
11+
* pytest-server-fixtures: Explicitly close initial Mongo client. #198
12+
* pytest-server-fixtures: Don't use context manager for CREATE DATABASE #186
13+
* pytest-shutil: Removed contextlib2 requirement. #144
14+
* pytest-shutil: Fixed forcing color through termcolor. #217
15+
* pytest-shutil: Replaced deprecated imp module #219
16+
* pytest-profiling: Added support to hide/show the full path of file. #95
17+
* pytest-profiling: Fixed SVG file generation on Windows. #93
18+
* pytest-profiling: Remove pinning of more-itertools. #194
19+
* pytest-profiling: Add support to define element number for print_stats() #96
20+
* pytest-profiling: Fix mock in test_writes_summary #223
21+
* pytest-virtualenv: Modernised package. #188 #185 #182 #163
22+
* pytest-virtualenv: Fixed virtualenv creation on Windows. #142
23+
* pytest-virtualenv: Added delete_workspace parameter to VirtualEnv. #195
24+
* pytest-virtualenv: Removed extras_require. #240
25+
* ci: Remove usage of deprecated distutils. #189
26+
* ci: Disabled jenkins server tests on CircleCI to improve build time.
27+
* ci: Fixed `collections` import for py 3.11 compatibility #222
28+
29+
30+
### 1.7.1 (2019-05-28)
31+
* pytest-profiling: Fix pytest-profiling to profile fixtures. #48
32+
* pytest-devpi-server: Fixed Python 3.4 support updating "ruamel.yaml" requirements. #138
33+
* ci: Added PYTEST_DONT_REWRITE in order to suppress module already imported. #123
34+
35+
36+
### 1.7.0 (2019-02-21)
737
* All: Support pytest >= 4.0.0
838
* All: Support Python 3.7
939
* pytest-server-fixtures: if host not defined on your machine, default to localhost

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.7.1
1+
1.8.0

common_setup.py

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,8 @@ def common_setup(src_dir):
4848
readme_file = os.path.join(this_dir, 'README.md')
4949
changelog_file = os.path.join(this_dir, 'CHANGES.md')
5050
version_file = os.path.join(this_dir, 'VERSION')
51-
52-
# Convert Markdown to RST for PyPI
53-
try:
54-
import pypandoc
55-
long_description = pypandoc.convert_file(readme_file, 'rst')
56-
changelog = pypandoc.convert_file(changelog_file, 'rst')
57-
except (IOError, ImportError, OSError):
58-
long_description = open(readme_file).read()
59-
changelog = open(changelog_file).read()
51+
long_description = open(readme_file).read()
52+
changelog = open(changelog_file).read()
6053

6154
# Gather trailing arguments for pytest, this can't be done using setuptools' api
6255
if 'test' in sys.argv:
@@ -66,12 +59,14 @@ def common_setup(src_dir):
6659
PyTest.src_dir = src_dir
6760

6861
return dict(
69-
# Version is shared between all the projects in this repo
70-
version=open(version_file).read().strip(),
71-
long_description='\n'.join((long_description, changelog)),
72-
url='https://github.com/manahl/pytest-plugins',
73-
license='MIT license',
74-
platforms=['unix', 'linux'],
75-
cmdclass={'test': PyTest, 'egg_info': EggInfo},
76-
include_package_data=True
77-
)
62+
# Version is shared between all the projects in this repo
63+
version=open(version_file).read().strip(),
64+
long_description='\n'.join((long_description, changelog)),
65+
long_description_content_type='text/markdown',
66+
url='https://github.com/man-group/pytest-plugins',
67+
license='MIT license',
68+
platforms=['unix', 'linux'],
69+
cmdclass={'test': PyTest, 'egg_info': EggInfo},
70+
include_package_data=True,
71+
python_requires='>=3.6',
72+
)

install.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function update_apt_sources {
117117
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
118118
sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
119119
--dearmor
120-
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
120+
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
121121

122122
apt install ca-certificates
123123
apt-get update
@@ -165,7 +165,10 @@ function install_minio {
165165
function install_chrome_headless {
166166
wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/google-chrome-stable_current_amd64.deb
167167
dpkg -i --force-depends /tmp/google-chrome-stable_current_amd64.deb || apt-get install -f -y
168-
wget -q https://storage.googleapis.com/chrome-for-testing-public/128.0.6613.86/linux64/chromedriver-linux64.zip -O /tmp/chromedriver_linux64.zip
168+
json=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json)
169+
version=$(echo "$json" | jq -r '.channels.Stable.version')
170+
url="https://storage.googleapis.com/chrome-for-testing-public/$version/linux64/chromedriver-linux64.zip"
171+
wget -q "$url" -O /tmp/chromedriver_linux64.zip
169172
unzip /tmp/chromedriver_linux64.zip
170173
mv chromedriver-linux64/chromedriver /usr/local/bin/
171174
chmod a+x /usr/local/bin/chromedriver

pytest-devpi-server/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

pytest-fixture-config/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

pytest-git/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

pytest-listener/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

pytest-profiling/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ norecursedirs =
99
tests/integration/profile/tests
1010

1111
[bdist_wheel]
12-
universal = 1
12+
universal = 0

pytest-pyramid-server/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

pytest-qt-app/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

pytest-server-fixtures/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

pytest-server-fixtures/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
kwargs = common_setup('pytest_server_fixtures')
5858
kwargs.update(dict(
5959
name='pytest-server-fixtures',
60-
description='Extensible server fixures for py.test',
60+
description='Extensible server fixtures for py.test',
6161
author='Edward Easton',
6262
author_email='[email protected]',
6363
classifiers=classifiers,

pytest-shutil/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

pytest-svn/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

pytest-verbose-parametrize/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ norecursedirs =
99
tests/integration/parametrize_ids
1010

1111
[bdist_wheel]
12-
universal = 1
12+
universal = 0

pytest-virtualenv/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

pytest-webdriver/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ norecursedirs =
88
dist
99

1010
[bdist_wheel]
11-
universal = 1
11+
universal = 0

0 commit comments

Comments
 (0)