diff --git a/setup3.py b/setup3.py new file mode 100644 index 0000000..708b456 --- /dev/null +++ b/setup3.py @@ -0,0 +1,9 @@ +import os.path +from setuptools import setup + +from setupbase import (setup_args, find_scripts, find_packages) + +setup_args['entry_points'] = find_scripts(True) +setup_args['packages'] = find_packages() + +setup(use_2to3 = True, **setup_args) diff --git a/setupbase.py b/setupbase.py index 3def278..e3bb675 100644 --- a/setupbase.py +++ b/setupbase.py @@ -23,7 +23,10 @@ from __future__ import print_function import os import sys -from ConfigParser import ConfigParser +try: + from configparser import ConfigParser +except: + from ConfigParser import ConfigParser from distutils.command.build_py import build_py from glob import glob @@ -40,6 +43,13 @@ pjoin = os.path.join def oscmd(s): print(">", s) os.system(s) + +try: + execfile +except NameError: + def execfile(fname, globs, locs=None): + locs = locs or globs + exec(compile(open(fname).read(), fname, "exec"), globs, locs) # A little utility we'll need below, since glob() does NOT allow you to do # exclusion on multiple endings! @@ -58,7 +68,7 @@ def file_doesnt_endwith(test,endings): #--------------------------------------------------------------------------- # release.py contains version, authors, license, url, keywords, etc. -execfile(pjoin('IPython','core','release.py')) +execfile(pjoin('IPython','core','release.py'), globals()) # Create a dict with the basic information # This dict is eventually passed to setup after additional keys are added. diff --git a/setupext/__init__.py b/setupext/__init__.py index 5f93fe1..c8ce037 100644 --- a/setupext/__init__.py +++ b/setupext/__init__.py @@ -1,3 +1,3 @@ # load extended setup modules for distuils -from install_data_ext import install_data_ext +from .install_data_ext import install_data_ext