diff options
-rw-r--r-- | .readthedocs.yml | 5 | ||||
-rw-r--r-- | appveyor.yml | 21 | ||||
-rw-r--r-- | docs/conf.py | 36 | ||||
-rw-r--r-- | docs/requirements.txt | 1 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | setup.py | 27 | ||||
-rw-r--r-- | tests/requirements.txt | 4 | ||||
-rw-r--r-- | tox.ini | 7 |
8 files changed, 63 insertions, 40 deletions
diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..8ae4468 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,5 @@ +python: + version: 3 + extra_requirements: + - docs + pip_install: true diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..0a8ce5c --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,21 @@ +environment: + + APPVEYOR: true + + matrix: + - PYTHON: "C:\\Python36-x64" + - PYTHON: "C:\\Python27-x64" + +install: + # symlink python from a directory with a space + - "mklink /d \"C:\\Program Files\\Python\" %PYTHON%" + - "SET PYTHON=\"C:\\Program Files\\Python\"" + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + +build: off + +test_script: + - "python -m pip install tox" + - "tox" + +version: '{build}' diff --git a/docs/conf.py b/docs/conf.py index 1df2380..5d50361 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,56 +1,34 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import os -import sys -import subprocess - -if 'check_output' not in dir(subprocess): - import subprocess32 as subprocess - extensions = [ 'sphinx.ext.autodoc', + 'jaraco.packaging.sphinx', 'rst.linker', ] -# General information about the project. - -root = os.path.join(os.path.dirname(__file__), '..') -setup_script = os.path.join(root, 'setup.py') -fields = ['--name', '--version', '--url', '--author'] -dist_info_cmd = [sys.executable, setup_script] + fields -output_bytes = subprocess.check_output(dist_info_cmd, cwd=root) -project, version, url, author = output_bytes.decode('utf-8').strip().split('\n') - -copyright = '2015-2017 ' + author - -# The full version, including alpha/beta/rc tags. -release = version - master_doc = 'index' link_files = { '../CHANGES.rst': dict( using=dict( GH='https://github.com', - project=project, - url=url, ), replace=[ dict( - pattern=r"(Issue )?#(?P<issue>\d+)", - url='{url}/issues/{issue}', + 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", + 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+)", + 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+)", + pattern=r'Setuptools #(?P<setuptools_issue>\d+)', url='https://github.com/pypa/setuptools/issues/{setuptools_issue}/', ), ], diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 442df9f..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -rst.linker @@ -2,5 +2,5 @@ release = dists upload dists = clean --all sdist bdist_wheel -[wheel] +[bdist_wheel] universal = 1 @@ -11,6 +11,11 @@ with io.open('README.rst', encoding='utf-8') as readme: 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, @@ -20,11 +25,29 @@ params = dict( description=description or name, long_description=long_description, url="https://github.com/pytest-dev/" + name, - namespace_packages=name.split('.')[:-1], + namespace_packages=( + name.split('.')[:-1] if nspkg_technique == 'managed' + else [] + ), py_modules=['ptr'], + python_requires='>=2.6', install_requires=[ ], extras_require={ + 'testing': [ + 'pytest>=2.8', + 'pytest-sugar', + 'pytest-virtualenv', + ], + 'testing:python_version=="2.6"': [ + # undeclared dependency of pytest-virtualenv + 'importlib', + ], + 'docs': [ + 'sphinx', + 'jaraco.packaging>=3.2', + 'rst.linker>=1.9', + ], }, setup_requires=[ 'setuptools_scm>=1.15.0', @@ -38,7 +61,7 @@ params = dict( "Programming Language :: Python :: 3", "Framework :: Pytest", ], - entry_points = { + entry_points={ 'distutils.commands': [ 'ptr = ptr:PyTest', 'pytest = ptr:PyTest', diff --git a/tests/requirements.txt b/tests/requirements.txt deleted file mode 100644 index fd5c965..0000000 --- a/tests/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -pytest >= 2.8 -pytest-virtualenv -importlib; python_version=="2.6" -subprocess32; python_version=="2.6" @@ -1,6 +1,7 @@ -[testenv] -deps = - -rtests/requirements.txt +[tox] +minversion = 2.4 +[testenv] commands = py.test {posargs} usedevelop = True +extras = testing |