Skip to content

Commit

Permalink
Switched to setuptools_scm
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Jul 5, 2017
1 parent 18ad89c commit 552a4e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 0 additions & 2 deletions pytypes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,6 @@
except ImportError:
import typing

version = '1.0b1'

checking_enabled = False # Will be enabled by default, unless -o is set
# Note that you cannot change this flag later on. You must specify
# this right after first import of pytypes.
Expand Down
5 changes: 4 additions & 1 deletion pytypes/typelogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import datetime
from inspect import isclass, ismodule, getsourcelines, findsource

import pkg_resources

try:
from backports.typing import Union, Any, Tuple, TupleMeta
except ImportError:
Expand All @@ -40,7 +42,7 @@
_check_as_func
from .util import getargspecs, getargnames
from .typechecker import _typeinspect_func
from . import version, util
from . import util

_member_cache = {}
_fully_typelogged_modules = {}
Expand Down Expand Up @@ -219,6 +221,7 @@ def _dump_module(module_node, path=None, python2=False, suffix=None):
except:
exec_info = 'unknown call'
with open(stubpath, 'w') as stub_handle:
version = pkg_resources.get_distribution('pytypes').version
lines = ['"""',
'Automatically generated Python 2.7-compliant stubfile of ' if python2
else 'Automatically generated stubfile of \n',
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

setup(
name='pytypes',
version='1.0b1',
use_scm_version={
'version_scheme': 'post-release',
'local_scheme': 'dirty-tag'
},
description='Typing toolbox for Python 3 _and_ 2.',
long_description=readme,
url='https://github.com/Stewori/pytypes',
Expand All @@ -29,6 +32,7 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
setup_requires=['setuptools_scm >= 1.7.0'],
extras_require={
':python_version == "2.7"': 'typing',
':python_version == "3.3"': 'typing >= 3.5',
Expand Down

0 comments on commit 552a4e7

Please sign in to comment.