Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Nov 28, 2014
1 parent 2506915 commit 8febe48
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 54 deletions.
2 changes: 0 additions & 2 deletions AUTHORS

This file was deleted.

14 changes: 0 additions & 14 deletions COPYING

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion minidb.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

__author__ = 'Thomas Perl <m@thp.io>'
__version__ = '1.1'
__website__ = 'http://thp.io/2010/minidb/'
__url__ = 'http://thp.io/2010/minidb/'
__license__ = 'ISC'


Expand Down
50 changes: 14 additions & 36 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,42 +1,20 @@
#!/usr/bin/env python
# Setup script for python-minidb
#!/usr/bin/env python3
# Setup script for
'minidb'
# by Thomas Perl <thp.io>

from distutils.core import setup

import os
import re
import sys

# Make sure that we import the local minidb module
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import minidb


# How is the package going to be called?
PACKAGE = 'minidb'

# List the modules that need to be installed/packaged
MODULES = (
'minidb',
)

# These metadata fields are simply taken from the Jabberbot module
VERSION = minidb.__version__
WEBSITE = minidb.__website__
LICENSE = minidb.__license__
DESCRIPTION = minidb.__doc__

# Extract name and e-mail ("Firstname Lastname <mail@example.org>")
AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', minidb.__author__).groups()

setup(name=PACKAGE,
version=VERSION,
description=DESCRIPTION,
author=AUTHOR,
author_email=EMAIL,
license=LICENSE,
url=WEBSITE,
py_modules=MODULES,
download_url=WEBSITE+PACKAGE+'-'+VERSION+'.tar.gz')
dirname = os.path.dirname(os.path.abspath(__file__))
src = open(os.path.join(dirname, '{}.py'.format(__doc__))).read()
docstrings = re.findall('"""(.*)"""', src)
m = dict(re.findall("__([a-z_]+)__\s*=\s*'([^']+)'", src))
m['name'] = __doc__
m['author'], m['author_email'] = re.match(r'(.*) <(.*)>', m['author']).groups()
m['description'] = docstrings[0]
m['py_modules'] = (m['name'],)
m['download_url'] = '{m[url]}{m[name]}-{m[version]}.tar.gz'.format(m=m)

from distutils.core import setup
setup(**m)
File renamed without changes.

0 comments on commit 8febe48

Please sign in to comment.