Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #213 from pllim/fix-configparser
Browse files Browse the repository at this point in the history
Fix ConfigParser compatibility with Python 3
  • Loading branch information
pllim authored Jul 19, 2016
2 parents 9955a0c + e086b87 commit 7c98828
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
from astropy_helpers.version_helpers import generate_version_py

# Get some values from the setup.cfg
from distutils import config
conf = config.ConfigParser()
try:
from ConfigParser import ConfigParser
except ImportError:
from configparser import ConfigParser
conf = ConfigParser()
conf.read(['setup.cfg'])
metadata = dict(conf.items('metadata'))

Expand Down

0 comments on commit 7c98828

Please sign in to comment.