Start working towards 1.0

This commit is contained in:
Ian Cordasco 2017-03-04 14:14:29 -06:00
parent 8090c3da26
commit 2c4e606b35
No known key found for this signature in database
GPG Key ID: 656D3395E4A9791A
10 changed files with 35 additions and 25 deletions

View File

@ -1,20 +1,14 @@
#!/usr/bin/env python
"""Packaging logic for the rfc3986 library."""
import io
import os
import sys
import setuptools
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src')) # noqa
import rfc3986
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py bdist_wheel sdist upload')
sys.exit()
packages = [
'rfc3986',
]
@ -25,15 +19,16 @@ with io.open('README.rst', encoding='utf-8') as f:
with io.open('HISTORY.rst', encoding='utf-8') as f:
history = f.read()
setup(
setuptools.setup(
name='rfc3986',
version=rfc3986.__version__,
description='Validating URI References per RFC 3986',
long_description=readme + '\n\n' + history,
author='Ian Cordasco',
author_email='ian.cordasco@rackspace.com',
url='https://rfc3986.readthedocs.org',
author_email='graffatcolmingov@gmail.com',
url='http://rfc3986.readthedocs.io',
packages=packages,
package_dir={'': 'src/'},
package_data={'': ['LICENSE']},
include_package_data=True,
license='Apache 2.0',
@ -43,10 +38,11 @@ setup(
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
),
)

34
tox.ini
View File

@ -1,5 +1,5 @@
[tox]
envlist = py26,py27,py32,py33,py34,pypy,{py27,py34}-flake8
envlist = py27,py33,py34,py35,py36,pypy,flake8
[testenv]
pip_pre = False
@ -12,24 +12,26 @@ commands =
deps = {[testenv]deps}
commands = py.test {posargs}
[testenv:py27-flake8]
basepython = python2.7
[testenv:flake8]
basepython = python3
deps =
flake8
commands = flake8 {posargs} rfc3986
flake8-docstrings
flake8-import-order
commands = flake8 {posargs} src/rfc3986
[testenv:py34-flake8]
basepython = python3.4
[testenv:build]
deps =
flake8
commands = flake8 {posargs} rfc3986
wheel
commands =
python setup.py sdist bdist_wheel
[testenv:release]
deps =
wheel
{[testenv:build]deps}
twine>=1.4.0
commands =
python setup.py sdist bdist_wheel
{[testenv:build]commands}
twine upload {posargs:--skip-existing dist/*}
[testenv:docs]
@ -47,3 +49,15 @@ commands =
[pytest]
addopts = -q
norecursedirs = *.egg .git .* _*
[flake8]
exclude =
.tox,
.git,
__pycache__,
*.pyc,
*.egg-info,
.cache,
.eggs
max-complexity = 10
import-order-style = google