Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 51082f3

Browse files
committed
2 parents 8355b65 + 8186f76 commit 51082f3

File tree

9 files changed

+245
-126
lines changed

9 files changed

+245
-126
lines changed

.flake8

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
[flake8]
2-
ignore = W191,W503
2+
ignore =
3+
# Allow tabs for indentation
4+
W191
5+
# Workaround for https://github.com/PyCQA/pycodestyle/issues/836
6+
E117
7+
# W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513
8+
W503
9+
# W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545
10+
W504

.travis.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
1-
dist: trusty
1+
dist: xenial
22
sudo: false
33
language: python
44

55
python:
66
- 2.7
7-
- &latest_py3 3.6
8-
- nightly
7+
- 3.6
8+
- &latest_py3 3.7
99

1010
jobs:
1111
fast_finish: true
1212
include:
1313
- stage: deploy
1414
if: tag IS present
1515
python: *latest_py3
16-
install: skip
17-
script: skip
18-
deploy:
19-
provider: pypi
20-
on:
21-
tags: true
22-
all_branches: true
23-
user: jaraco
24-
password:
25-
secure: lZfYQx0ZrCf2FJ+348etKWfzTySB3BZYGd0ce5RFHN2BppcdkONyJfTs4rgdrFEn/WtOaKV3SkJYR09xvlr+4kbLibg7fXhueqZt0ZkhRBnoDE4SxCjICyFCmisG6O3zkrVosizch70/0MqseNanhgXOPhd5llCfQHIqLsa145BG4hM5kxAHPO3Rz2/HCObOTPe4HKj93RAK7lPIMZVN6omcWoG6ZB0QqK+i3LTUtmJ3gE6q/iHk3VF9cJs8xtn3hdo++Lhrboa2NIqf6fl8oxR1C24Wh8vBQ69uTNjmVnDFYMulTs5475jjgDBXPPgVz3CAqYAy/PI+NPw59ebK8MzlaMRK/h/xSrdhxW6K3WbBL71Dn2UGuejXHFC3IuCI832xwkuEupOcGLWz4r2uBnhbgXF63vZ2gYPqrCGHxvDpbtllTVyEeebP8BnFzZttxSn9rbhTP1O9Dn/9tRko8WskyXIR+/2JOA9KP5uT47yeHoFBBUS0GB1XdkGhBrJfQx2LhfHuI6bpzosMiMfJrVNZEg8k0I9XA0uwxDgZrdqKGMKBR6233MXiJg8NyUPRInCRGth4rufcq6kn+wsT9RvuSt9XOhGiYLwChjvHexUXrLGBgupu0Y80Oqcp3YkDG3WHUX++Z2zJSQovrb4BMdKS6Y4usQ8Df5SklIpMCf0=
26-
distributions: dists
27-
skip_cleanup: true
28-
skip_upload_docs: true
16+
before_script: skip
17+
env:
18+
- TWINE_USERNAME=jaraco
19+
# TWINE_PASSWORD
20+
- secure: Ud9UIW92Gdg2eZpuA9UwC0YjanRaD9CTpKXoLT9Cjp5C2rufwiZd8K/LXK6P6x/nVyLJ8+7HR+TQTReoO2c6kt2vVkA9i3KE2N/bD9PXQo80NwMWepFkRBJh28M9x3fGeQTYRegx3cUWVh4gaa9ZFZBwSjnRZvTtvQh1WhEvHWFzBkb/8CkifmQPmdEYT4D0JBskBAtC295G6p3FukcSdzKlDljY1G4m2ZDqUepYC0R0mr5vDz9JxbJ4axxUvvy7hVd5vrI6xshUc1lRYGocfTcc0IBCq8kw2nzG+KK06axBGFMqCioT4ohUFWB1sLj8pbwpc0uCLtjIBE9OnFZFt52ZKuJcJFAZwiQ3Mxnpg+WC39mrD+jAyIOBDIp/5+2JDCPGyD2i8RuBJrt1CzMqno+Y0K5H2g3XD7E+pclFgyj21JhqUzRAvYE9gbA6561PyFoi+JEFbk5eiNYRdWjp/7XJJSNWB3tDC6hbEAIGQLY2ZcZjnURKN92AC7361negFgwEaaCRUeHx3g7k/wrR/16Po3kFFb/vzQ4ygMxH0lVzzQ0M81121zl4fJPzs/klnBVcf4YOph8Gm6md3ARJu7CKDV2bt2Qr/TObroYFe/flAWZ+KM5DTFqd1dediYrrdVMDuvwSUn1kDjpRnrcI/v0MeT1Vx5v2yekS8iucwCY=
21+
- TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD"
22+
script: tox -e release
2923

3024
cache: pip
3125

3226
install:
3327
- pip install tox tox-venv
3428

29+
before_script:
30+
# Disable IPv6. Ref travis-ci/travis-ci#8361
31+
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
32+
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
33+
fi
3534
script: tox

docs/conf.py

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,31 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

4-
extensions = [
5-
'sphinx.ext.autodoc',
6-
'jaraco.packaging.sphinx',
7-
'rst.linker',
8-
]
4+
extensions = ["sphinx.ext.autodoc", "jaraco.packaging.sphinx", "rst.linker"]
95

10-
master_doc = 'index'
6+
master_doc = "index"
117

128
link_files = {
13-
'../CHANGES.rst': dict(
14-
using=dict(
15-
GH='https://github.com',
16-
),
17-
replace=[
18-
dict(
19-
pattern=r'(Issue )?#(?P<issue>\d+)',
20-
url='{package_url}/issues/{issue}',
21-
),
22-
dict(
23-
pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
24-
with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
25-
),
26-
dict(
27-
pattern=r'PEP[- ](?P<pep_number>\d+)',
28-
url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',
29-
),
30-
dict(
31-
pattern=r'Setuptools #(?P<setuptools_issue>\d+)',
32-
url='https://github.com/pypa/setuptools/issues/{setuptools_issue}/',
33-
),
34-
],
35-
),
9+
"../CHANGES.rst": dict(
10+
using=dict(GH="https://github.com"),
11+
replace=[
12+
dict(
13+
pattern=r"(Issue #|\B#)(?P<issue>\d+)",
14+
url="{package_url}/issues/{issue}",
15+
),
16+
dict(
17+
pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n",
18+
with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n",
19+
),
20+
dict(
21+
pattern=r"PEP[- ](?P<pep_number>\d+)",
22+
url="https://www.python.org/dev/peps/pep-{pep_number:0>4}/",
23+
),
24+
dict(
25+
pattern=r'Setuptools #(?P<setuptools_issue>\d+)',
26+
url='https://github.com/pypa/setuptools'
27+
'/issues/{setuptools_issue}/',
28+
),
29+
],
30+
)
3631
}

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"]
3+
build-backend = "setuptools.build_meta"

pytest.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@
22
norecursedirs=dist build .tox .eggs
33
addopts=--doctest-modules --flake8
44
doctest_optionflags=ALLOW_UNICODE ELLIPSIS
5+
filterwarnings=
6+
ignore:Possible nested set::pycodestyle:113
7+
ignore:Using or importing the ABCs::flake8:410
8+
# workaround for https://sourceforge.net/p/docutils/bugs/348/
9+
ignore:'U' mode is deprecated::docutils.io
10+
# workaround for https://gitlab.com/pycqa/flake8/issues/275
11+
ignore:You passed a bytestring as `filenames`.::flake8

setup.cfg

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,49 @@
1-
[aliases]
2-
release = dists upload
3-
dists = clean --all sdist bdist_wheel
4-
51
[bdist_wheel]
62
universal = 1
73

84
[metadata]
95
license_file = LICENSE
6+
name = pytest-runner
7+
author = Jason R. Coombs
8+
author_email = [email protected]
9+
description = Invoke py.test as distutils command with dependency resolution
10+
long_description = file:README.rst
11+
url = https://github.com/pytest-dev/pytest-runner/
12+
classifiers =
13+
Development Status :: 5 - Production/Stable
14+
Intended Audience :: Developers
15+
License :: OSI Approved :: MIT License
16+
Programming Language :: Python :: 2.7
17+
Programming Language :: Python :: 3
18+
Framework :: Pytest
19+
20+
[options]
21+
packages = find:
22+
include_package_data = true
23+
python_requires = >=2.7
24+
install_requires =
25+
# setuptools 27.3 is required at run time
26+
setup_requires = setuptools_scm >= 1.15.0
27+
28+
[options.extras_require]
29+
testing =
30+
# upstream
31+
pytest >= 3.5, !=3.7.3
32+
pytest-checkdocs
33+
pytest-flake8
34+
35+
# local
36+
pytest-virtualenv
37+
38+
docs =
39+
# upstream
40+
sphinx
41+
jaraco.packaging >= 3.2
42+
rst.linker >= 1.9
43+
44+
# local
45+
46+
[options.entry_points]
47+
distutils.commands =
48+
ptr = ptr:PyTest
49+
pytest = ptr:PyTest

setup.py

Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,6 @@
11
#!/usr/bin/env python
22

3-
# Project skeleton maintained at https://github.com/jaraco/skeleton
4-
5-
import io
6-
73
import setuptools
84

9-
with io.open('README.rst', encoding='utf-8') as readme:
10-
long_description = readme.read()
11-
12-
name = 'pytest-runner'
13-
description = 'Invoke py.test as distutils command with dependency resolution'
14-
nspkg_technique = 'native'
15-
"""
16-
Does this package use "native" namespace packages or
17-
pkg_resources "managed" namespace packages?
18-
"""
19-
20-
params = dict(
21-
name=name,
22-
use_scm_version=True,
23-
author="Jason R. Coombs",
24-
author_email="[email protected]",
25-
description=description or name,
26-
long_description=long_description,
27-
url="https://github.com/pytest-dev/" + name,
28-
namespace_packages=(
29-
name.split('.')[:-1] if nspkg_technique == 'managed'
30-
else []
31-
),
32-
py_modules=['ptr'],
33-
python_requires='>=2.7,!=3.0,!=3.1',
34-
install_requires=[
35-
# setuptools 27.3 is required at run time
36-
],
37-
extras_require={
38-
'testing': [
39-
# upstream
40-
'pytest>=2.8',
41-
'pytest-sugar>=0.9.1',
42-
'collective.checkdocs',
43-
'pytest-flake8',
44-
45-
# local
46-
'pytest-virtualenv',
47-
],
48-
'docs': [
49-
# upstream
50-
'sphinx',
51-
'jaraco.packaging>=3.2',
52-
'rst.linker>=1.9',
53-
54-
# local
55-
],
56-
},
57-
setup_requires=[
58-
'setuptools_scm>=1.15.0',
59-
],
60-
classifiers=[
61-
"Development Status :: 5 - Production/Stable",
62-
"Intended Audience :: Developers",
63-
"License :: OSI Approved :: MIT License",
64-
"Programming Language :: Python :: 2.7",
65-
"Programming Language :: Python :: 3",
66-
"Framework :: Pytest",
67-
],
68-
entry_points={
69-
'distutils.commands': [
70-
'ptr = ptr:PyTest',
71-
'pytest = ptr:PyTest',
72-
],
73-
},
74-
)
75-
if __name__ == '__main__':
76-
setuptools.setup(**params)
5+
if __name__ == "__main__":
6+
setuptools.setup(use_scm_version=True)

0 commit comments

Comments
 (0)