-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
15 additions
and
54 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,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.