Permalink
Browse files

Adds support for proper versioning

  • Loading branch information...
swinkels committed Jul 1, 2016
1 parent bbe2c81 commit 7fb962e6609894565e7479ea63c0e4f6e9b4b97d
Showing with 32 additions and 1 deletion.
  1. +7 −0 CHANGES.md
  2. +1 −0 git_cc/__init__.py
  3. +2 −0 setup.cfg
  4. +22 −1 setup.py
View
@@ -0,0 +1,7 @@
Changelog for git-cc
====================
1.0.0 (unreleased)
------------------
- Started versioning at 1.0.0
View
@@ -0,0 +1 @@
__version__ = '1.0.0.dev0'
View
@@ -0,0 +1,2 @@
[zest.releaser]
python-file-with-version = git_cc/__init__.py
View
@@ -1,7 +1,28 @@
# -*- coding: utf-8 -*-
import os
import re
from setuptools import setup, find_packages
# The following approach to retrieve the version number is inspired by this
# comment:
#
# https://github.com/zestsoftware/zest.releaser/issues/37#issuecomment-14496733
#
# With this approach, development installs always show the right version number
# and do not require a reinstall (as the definition of the version number in
# this setup file would).
version = 'no version defined'
current_dir = os.path.dirname(__file__)
with open(os.path.join(current_dir, "git_cc", "__init__.py")) as f:
rx = re.compile("__version__ = '(.*)'")
for line in f:
m = rx.match(line)
if m:
version = m.group(1)
with open('README.md') as f:
readme = f.read()
@@ -10,7 +31,7 @@
setup(
name='git_cc',
# version=version,
version=version,
description='Provides a bridge between git and ClearCase',
long_description=readme,
author="Charles O'Farrel and others",

0 comments on commit 7fb962e

Please sign in to comment.