Skip to content

Commit

Permalink
Bug fix for setup.py (forgot to remove import)
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed May 25, 2015
1 parent 659ec2c commit 3101718
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion executor/__init__.py
Expand Up @@ -60,7 +60,7 @@
)

# Semi-standard module versioning.
__version__ = '3.0'
__version__ = '3.0.1'

# Initialize a logger.
logger = logging.getLogger(__name__)
Expand Down
23 changes: 15 additions & 8 deletions setup.py
Expand Up @@ -3,21 +3,28 @@
# Setup script for the `executor' package.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: May 23, 2015
# Last Change: May 25, 2015
# URL: https://executor.readthedocs.org

import os, sys
# Standard library modules.
import os
import re

# De-facto standard solution for Python packaging.
from setuptools import setup, find_packages

# Find the directory where the source distribution was unpacked.
source_directory = os.path.dirname(os.path.abspath(__file__))

# Add the directory with the source distribution to the search path.
sys.path.append(source_directory)

# Import the module to find the version number (this is safe because we don't
# have any external dependencies).
from executor import __version__ as version_string
# Find the current version.
module = os.path.join(source_directory, 'executor', '__init__.py')
for line in open(module, 'r'):
match = re.match(r'^__version__\s*=\s*["\']([^"\']+)["\']$', line)
if match:
version_string = match.group(1)
break
else:
raise Exception("Failed to extract version from %s!" % module)

# Fill in the long description (for the benefit of PyPi)
# with the contents of README.rst (rendered by GitHub).
Expand Down

0 comments on commit 3101718

Please sign in to comment.