Permalink
Browse files

add packaging prerequisites

  • Loading branch information...
stefankoegl committed Apr 13, 2013
1 parent 47a5b58 commit 65a30c917c6439da304d546cc480559afe8105e2
Showing with 57 additions and 1 deletion.
  1. +2 −0 .gitignore
  2. +2 −0 AUTHORS
  3. +5 −0 MANIFEST.in
  4. +2 −1 makefile
  5. +8 −0 podcastparser.py
  6. +38 −0 setup.py
View
@@ -2,3 +2,5 @@
*.swp
.coverage
doc/_build
dist
MANIFEST
View
@@ -0,0 +1,2 @@
Thomas Perl <m@thp.io>
Stefan Kögl <stefan@skoegl.net>
View
@@ -0,0 +1,5 @@
include AUTHORS
include LICENSE
include requirements-test.txt
include makefile
include README.md
View
@@ -4,6 +4,7 @@ test:
clean:
find -name '*.pyc' -exec rm '{}' \;
rm -f .coverage
rm -f .coverage MANIFEST
rm -rf dist __pycache__
.PHONY: test clean
View
@@ -16,6 +16,14 @@
# PERFORMANCE OF THIS SOFTWARE.
#
""" Simplified, fast RSS parser """
# Will be parsed by setup.py to determine package metadata
__author__ = 'Thomas Perl <m@thp.io>'
__version__ = '0.1'
__website__ = 'https://github.com/gpodder/podcastparser'
__license__ = 'ISC License'
from xml import sax
import re
View
@@ -0,0 +1,38 @@
#!/usr/bin/env python
from distutils.core import setup
import re
import os.path
dirname = os.path.dirname(os.path.abspath(__file__))
filename = os.path.join(dirname, 'podcastparser.py')
src = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", src))
docstrings = re.findall('"""(.*)"""', src)
PACKAGE = 'podcastparser'
MODULES = (
'podcastparser',
)
AUTHOR_EMAIL = metadata['author']
VERSION = metadata['version']
WEBSITE = metadata['website']
LICENSE = metadata['license']
DESCRIPTION = docstrings[0]
LONG_DESCRIPTION = open('README.md').read()
# Extract name and e-mail ("Firstname Lastname <mail@example.org>")
AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', AUTHOR_EMAIL).groups()
setup(name=PACKAGE,
version=VERSION,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author=AUTHOR,
author_email=EMAIL,
license=LICENSE,
url=WEBSITE,
py_modules=MODULES,
)

0 comments on commit 65a30c9

Please sign in to comment.