Skip to content

Commit

Permalink
add: development version numbering scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
chaimleib committed Dec 10, 2014
1 parent 2da2ef0 commit 3b2cba4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ Change log

Version 1.1.0
-------------
- Added documentation on return types to `IntervalTree` and `Interval`
- Added ability to use `Interval.distance_to()` with points, not just `Intervals`
- Added documentation on return types to `IntervalTree` and `Interval`
- `Interval.__cmp__()` works with points too
- Fix: `IntervalTree.score()` returned maximum score of 0.5 instead of 1.0. Now returns max of subscores instead of avg
- Internal improvements:
- Development version numbering scheme, based on `git describe` the "building towards" release is appended after a hyphen, eg. 1.0.2-37-g2da2ef0-1.10. The previous tagged release is 1.0.2, and there have been 37 commits since then, current tag is g2da2ef0, and we are getting ready for a 1.1.0 release
- Optimality tests added
- `Interval` overlap tests for ranges, `Interval`s and points added

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ all: test
test: pytest rst

quicktest: rst
python setup.py test
PYPI=$(PYPI) python setup.py test

pytest: deps-dev
"$(SCRIPTS_DIR)/testall.sh"
Expand Down Expand Up @@ -62,20 +62,20 @@ uninstall:

# Convert README to rst and check the result
rst: pydocutils pyandoc
python setup.py check --restructuredtext
PYPI=$(PYPI) python setup.py check --restructuredtext
@echo "README is ready for PyPI"

# Register at PyPI
register: rst
python setup.py register -r $(PYPI)
PYPI=$(PYPI) python setup.py register -r $(PYPI)

# Setup for live upload
release:
$(eval PYPI=pypi)

# Build source distribution
sdist-upload:
python setup.py sdist upload -r $(PYPI)
PYPI=$(PYPI) python setup.py sdist upload -r $(PYPI)

deps-dev: pyandoc

Expand Down
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"""
import sys
import os
import subprocess
import errno
from warnings import warn
from setuptools import setup, find_packages
Expand All @@ -36,8 +37,19 @@
pandoc.PANDOC_PATH = 'pandoc' # until pyandoc gets updated


def development_version():
p = subprocess.Popen('git describe'.split(), stdout=subprocess.PIPE)
version = p.communicate()[0].strip()
return version


## CONFIG
version = '1.1.0'
if 'PYPI' in os.environ and os.environ['PYPI'] == 'pypitest':
dev_version = development_version() + '-%s' % version
version = dev_version
print('Version %s' % version)

create_rst = True


Expand Down

0 comments on commit 3b2cba4

Please sign in to comment.