forked from dcramer/numbers
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dcramer#4 from jezdez/packaging
Add packaging stuff
- Loading branch information
Showing
3 changed files
with
41 additions
and
0 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 @@ | ||
include README.rst |
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,6 +1,8 @@ | ||
import sys | ||
import warnings | ||
|
||
__version__ = '1.0' | ||
|
||
warnings.warn('You are an idiot') | ||
|
||
|
||
|
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,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', | ||
], | ||
) |