Skip to content

Commit

Permalink
Merge pull request #5 from bmcfee/setupfix
Browse files Browse the repository at this point in the history
restructuring the package for version numbering
  • Loading branch information
bmcfee committed Oct 23, 2015
2 parents 71d916d + fe443de commit b72a4d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 1 addition & 2 deletions presets.py → presets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
import six
import types

__version__ = '0.1.0'

from .version import version as __version__

class Preset(object):
'''The Preset class overrides the default parameters of functions within a module.
Expand Down
6 changes: 6 additions & 0 deletions presets/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Version info"""

short_version = '0.1'
version = '0.1.1'
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from setuptools import setup, find_packages

import pkg_resources
version = pkg_resources.get_distribution('presets').version
import imp

version = imp.load_source('presets.version', 'presets/version.py')

setup(
name='presets',
version=version,
version=version.version,
description="A python module to manipulate default parameters of a module's functions",
author='Brian McFee',
url='http://github.com/bmcfee/presets',
Expand All @@ -22,6 +23,7 @@
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
],
keywords='default parameter',
license='ISC',
Expand Down

0 comments on commit b72a4d4

Please sign in to comment.