-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
18 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[bumpversion] | ||
files = setup.py radix/__init__.py | ||
commit = True | ||
tag = True | ||
current_version = 0.5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
bumpversion: | ||
pip install bumpversion | ||
|
||
major minor patch: bumpversion | ||
bumpversion $@ | ||
@echo "push via \`git push origin master --tags\`" | ||
|
||
clean: | ||
find . -name '*.py[co]' -delete | ||
find . -name '__pycache__' -delete | ||
find . -name '*.so' -delete | ||
rm -rf build/ dist/ *.egg *.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/usr/bin/env python | ||
|
||
import codecs | ||
import re | ||
import sys | ||
import os | ||
|
||
|
@@ -15,23 +14,6 @@ | |
RADIX_NO_EXT = os.environ.get('RADIX_NO_EXT', '0') | ||
RADIX_NO_EXT = True if RADIX_NO_EXT not in ('0', 'false', 'False') else False | ||
|
||
|
||
# Read the version number from a source file. | ||
def find_version(*file_paths): | ||
# Open in Latin-1 so that we avoid encoding errors. | ||
# Use codecs.open for Python 2 compatibility | ||
with codecs.open(join(here, *file_paths), 'r', 'latin1') as f: | ||
version_file = f.read() | ||
|
||
# The version line must have the form | ||
# __version__ = 'ver' | ||
version_re = re.compile(r"^__version__ = ['\"]([^'\"]*)['\"]", re.M) | ||
version_match = version_re.search(version_file) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
with codecs.open(join(here, 'README.rst'), encoding='utf-8') as f: | ||
README = f.read() | ||
|
||
|
@@ -45,7 +27,7 @@ def find_version(*file_paths): | |
|
||
setup( | ||
name='py-radix', | ||
version=find_version('radix', '__init__.py'), | ||
version='0.5.0', | ||
maintainer='Michael J. Schultz', | ||
maintainer_email='[email protected]', | ||
url='https://github.com/mjschultz/py-radix', | ||
|