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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Feb 14, 2019
2 parents 8355b65 + 8186f76 commit 51082f3
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 126 deletions.
10 changes: 9 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
[flake8]
ignore = W191,W503
ignore =
# Allow tabs for indentation
W191
# Workaround for https://github.com/PyCQA/pycodestyle/issues/836
E117
# W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513
W503
# W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545
W504
31 changes: 15 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
dist: trusty
dist: xenial
sudo: false
language: python

python:
- 2.7
- &latest_py3 3.6
- nightly
- 3.6
- &latest_py3 3.7

jobs:
fast_finish: true
include:
- stage: deploy
if: tag IS present
python: *latest_py3
install: skip
script: skip
deploy:
provider: pypi
on:
tags: true
all_branches: true
user: jaraco
password:
secure: lZfYQx0ZrCf2FJ+348etKWfzTySB3BZYGd0ce5RFHN2BppcdkONyJfTs4rgdrFEn/WtOaKV3SkJYR09xvlr+4kbLibg7fXhueqZt0ZkhRBnoDE4SxCjICyFCmisG6O3zkrVosizch70/0MqseNanhgXOPhd5llCfQHIqLsa145BG4hM5kxAHPO3Rz2/HCObOTPe4HKj93RAK7lPIMZVN6omcWoG6ZB0QqK+i3LTUtmJ3gE6q/iHk3VF9cJs8xtn3hdo++Lhrboa2NIqf6fl8oxR1C24Wh8vBQ69uTNjmVnDFYMulTs5475jjgDBXPPgVz3CAqYAy/PI+NPw59ebK8MzlaMRK/h/xSrdhxW6K3WbBL71Dn2UGuejXHFC3IuCI832xwkuEupOcGLWz4r2uBnhbgXF63vZ2gYPqrCGHxvDpbtllTVyEeebP8BnFzZttxSn9rbhTP1O9Dn/9tRko8WskyXIR+/2JOA9KP5uT47yeHoFBBUS0GB1XdkGhBrJfQx2LhfHuI6bpzosMiMfJrVNZEg8k0I9XA0uwxDgZrdqKGMKBR6233MXiJg8NyUPRInCRGth4rufcq6kn+wsT9RvuSt9XOhGiYLwChjvHexUXrLGBgupu0Y80Oqcp3YkDG3WHUX++Z2zJSQovrb4BMdKS6Y4usQ8Df5SklIpMCf0=
distributions: dists
skip_cleanup: true
skip_upload_docs: true
before_script: skip
env:
- TWINE_USERNAME=jaraco
# TWINE_PASSWORD
- 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=
- TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD"
script: tox -e release

cache: pip

install:
- pip install tox tox-venv

before_script:
# Disable IPv6. Ref travis-ci/travis-ci#8361
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
fi
script: tox
53 changes: 24 additions & 29 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

extensions = [
'sphinx.ext.autodoc',
'jaraco.packaging.sphinx',
'rst.linker',
]
extensions = ["sphinx.ext.autodoc", "jaraco.packaging.sphinx", "rst.linker"]

master_doc = 'index'
master_doc = "index"

link_files = {
'../CHANGES.rst': dict(
using=dict(
GH='https://github.com',
),
replace=[
dict(
pattern=r'(Issue )?#(?P<issue>\d+)',
url='{package_url}/issues/{issue}',
),
dict(
pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
),
dict(
pattern=r'PEP[- ](?P<pep_number>\d+)',
url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',
),
dict(
pattern=r'Setuptools #(?P<setuptools_issue>\d+)',
url='https://github.com/pypa/setuptools/issues/{setuptools_issue}/',
),
],
),
"../CHANGES.rst": dict(
using=dict(GH="https://github.com"),
replace=[
dict(
pattern=r"(Issue #|\B#)(?P<issue>\d+)",
url="{package_url}/issues/{issue}",
),
dict(
pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n",
with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n",
),
dict(
pattern=r"PEP[- ](?P<pep_number>\d+)",
url="https://www.python.org/dev/peps/pep-{pep_number:0>4}/",
),
dict(
pattern=r'Setuptools #(?P<setuptools_issue>\d+)',
url='https://github.com/pypa/setuptools'
'/issues/{setuptools_issue}/',
),
],
)
}
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"]
build-backend = "setuptools.build_meta"
7 changes: 7 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
norecursedirs=dist build .tox .eggs
addopts=--doctest-modules --flake8
doctest_optionflags=ALLOW_UNICODE ELLIPSIS
filterwarnings=
ignore:Possible nested set::pycodestyle:113
ignore:Using or importing the ABCs::flake8:410
# workaround for https://sourceforge.net/p/docutils/bugs/348/
ignore:'U' mode is deprecated::docutils.io
# workaround for https://gitlab.com/pycqa/flake8/issues/275
ignore:You passed a bytestring as `filenames`.::flake8
48 changes: 44 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,49 @@
[aliases]
release = dists upload
dists = clean --all sdist bdist_wheel

[bdist_wheel]
universal = 1

[metadata]
license_file = LICENSE
name = pytest-runner
author = Jason R. Coombs
author_email = [email protected]
description = Invoke py.test as distutils command with dependency resolution
long_description = file:README.rst
url = https://github.com/pytest-dev/pytest-runner/
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Framework :: Pytest

[options]
packages = find:
include_package_data = true
python_requires = >=2.7
install_requires =
# setuptools 27.3 is required at run time
setup_requires = setuptools_scm >= 1.15.0

[options.extras_require]
testing =
# upstream
pytest >= 3.5, !=3.7.3
pytest-checkdocs
pytest-flake8

# local
pytest-virtualenv

docs =
# upstream
sphinx
jaraco.packaging >= 3.2
rst.linker >= 1.9

# local

[options.entry_points]
distutils.commands =
ptr = ptr:PyTest
pytest = ptr:PyTest
74 changes: 2 additions & 72 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,76 +1,6 @@
#!/usr/bin/env python

# Project skeleton maintained at https://github.com/jaraco/skeleton

import io

import setuptools

with io.open('README.rst', encoding='utf-8') as readme:
long_description = readme.read()

name = 'pytest-runner'
description = 'Invoke py.test as distutils command with dependency resolution'
nspkg_technique = 'native'
"""
Does this package use "native" namespace packages or
pkg_resources "managed" namespace packages?
"""

params = dict(
name=name,
use_scm_version=True,
author="Jason R. Coombs",
author_email="[email protected]",
description=description or name,
long_description=long_description,
url="https://github.com/pytest-dev/" + name,
namespace_packages=(
name.split('.')[:-1] if nspkg_technique == 'managed'
else []
),
py_modules=['ptr'],
python_requires='>=2.7,!=3.0,!=3.1',
install_requires=[
# setuptools 27.3 is required at run time
],
extras_require={
'testing': [
# upstream
'pytest>=2.8',
'pytest-sugar>=0.9.1',
'collective.checkdocs',
'pytest-flake8',

# local
'pytest-virtualenv',
],
'docs': [
# upstream
'sphinx',
'jaraco.packaging>=3.2',
'rst.linker>=1.9',

# local
],
},
setup_requires=[
'setuptools_scm>=1.15.0',
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Framework :: Pytest",
],
entry_points={
'distutils.commands': [
'ptr = ptr:PyTest',
'pytest = ptr:PyTest',
],
},
)
if __name__ == '__main__':
setuptools.setup(**params)
if __name__ == "__main__":
setuptools.setup(use_scm_version=True)
Loading

0 comments on commit 51082f3

Please sign in to comment.