Skip to content

Commit

Permalink
Merge pull request dcramer#4 from jezdez/packaging
Browse files Browse the repository at this point in the history
Add packaging stuff
  • Loading branch information
dcramer committed Sep 12, 2012
2 parents 5150662 + c8a118f commit e6e8e40
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
@@ -0,0 +1 @@
include README.rst
2 changes: 2 additions & 0 deletions numbers.py
@@ -1,6 +1,8 @@
import sys
import warnings

__version__ = '1.0'

warnings.warn('You are an idiot')


Expand Down
38 changes: 38 additions & 0 deletions setup.py
@@ -0,0 +1,38 @@
import codecs
import re
from os import path
from distutils.core import setup


def read(*parts):
file_path = path.join(path.dirname(__file__), *parts)
return codecs.open(file_path).read()


def find_version(*parts):
version_file = read(*parts)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")


setup(
name='numbers',
version=find_version('numbers.py'),
py_modules=['numbers'],
author='David Cramer',
author_email='dcramer@gmail.com',
url='https://github.com/dcramer/numbers',
description='Python Numbers for Humans.',
long_description=read('README.rst'),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Utilities',
'Topic :: Scientific/Engineering :: Mathematics',
],
)

0 comments on commit e6e8e40

Please sign in to comment.