Skip to content

Commit

Permalink
Merge pull request #156 from hawkowl/incremental
Browse files Browse the repository at this point in the history
Port to using Incremental
  • Loading branch information
hawkowl authored Dec 14, 2016
2 parents f6f07be + f148124 commit b436c6c
Show file tree
Hide file tree
Showing 27 changed files with 59 additions and 40 deletions.
11 changes: 11 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[run]
source =
treq
branch = True


[paths]
source =
src/
.tox/*/lib/python*/site-packages/
.tox/pypy*/site-packages/
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ build
dist
MANIFEST
.coverage
.coveragerc
coverage
htmlcov
_trial_temp
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include treq/_version README.rst LICENSE tox.ini tox2travis.py requirements-dev.txt
include README.rst LICENSE tox.ini tox2travis.py requirements-dev.txt .coveragerc
recursive-include docs *
prune docs/_build
exclude .travis.yml
Expand Down
61 changes: 31 additions & 30 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
from setuptools import find_packages, setup
import os.path

with open(os.path.join(os.path.dirname(__file__), "treq", "_version")) as ver:
__version__ = ver.readline().strip()

classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -19,30 +15,35 @@
"Programming Language :: Python :: Implementation :: PyPy",
]

with open('README.rst') as f:
readme = f.read()
if __name__ == "__main__":

with open('README.rst') as f:
readme = f.read()

setup(
name="treq",
version=__version__,
packages=find_packages(),
install_requires=[
"requests >= 2.1.0",
"six",
"Twisted[tls] >= 16.0.0",
# Twisted[tls] 16.0.0 doesn't specify a version.
"service_identity >= 14.0.0",
# Twisted[tls] 16.0.0 requires 0.13, which doesn't work on Python 3.
"pyOpenSSL >= 0.15.1",
],
package_data={"treq": ["_version"]},
author="David Reid",
author_email="[email protected]",
maintainer="Amber Brown",
maintainer_email="[email protected]",
classifiers=classifiers,
description="A requests-like API built on top of twisted.web's Agent",
license="MIT/X",
url="http://github.com/twisted/treq",
long_description=readme
)
setup(
name="treq",
packages=find_packages('src'),
package_dir={"": "src"},
setup_requires=["incremental"],
use_incremental=True,
install_requires=[
"incremental",
"requests >= 2.1.0",
"six",
"Twisted[tls] >= 16.0.0",
# Twisted[tls] 16.0.0 doesn't specify a version.
"service_identity >= 14.0.0",
# Twisted[tls] 16.0.0 requires 0.13, which doesn't work on Python 3.
"pyOpenSSL >= 0.15.1",
],
package_data={"treq": ["_version"]},
author="David Reid",
author_email="[email protected]",
maintainer="Amber Brown",
maintainer_email="[email protected]",
classifiers=classifiers,
description="A requests-like API built on top of twisted.web's Agent",
license="MIT/X",
url="http://github.com/twisted/treq",
long_description=readme
)
8 changes: 3 additions & 5 deletions treq/__init__.py → src/treq/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from __future__ import absolute_import, division, print_function

from twisted.python.modules import getModule as _getModule
from ._version import __version__

from treq.api import head, get, post, put, patch, delete, request
from treq.content import collect, content, text_content, json_content

__version__ = __version__.base()

__all__ = ['head', 'get', 'post', 'put', 'patch', 'delete', 'request',
'collect', 'content', 'text_content', 'json_content']

__version__ = (
_getModule(__name__).filePath.sibling("_version").getContent().strip()
)
File renamed without changes.
11 changes: 11 additions & 0 deletions src/treq/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
Provides Treq version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update Treq` to change this file.

from incremental import Version

__version__ = Version('Treq', 16, 12, 0)
__all__ = ["__version__"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ deps =
passenv = TERM # ensure colors
commands =
pip list
coverage run --branch --source=treq {envbindir}/trial {posargs:treq}
coverage run {envbindir}/trial {posargs:treq}
coverage report -m

[testenv:flake8]
skip_install = True
deps = flake8
commands = flake8 treq/
commands = flake8 src/treq/

[testenv:pypi-readme]
deps =
Expand Down
1 change: 0 additions & 1 deletion treq/_version

This file was deleted.

0 comments on commit b436c6c

Please sign in to comment.