Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make installation with Python 3 possible.

  • Loading branch information...
commit b9f6e707fbcd50964bce4aa0f2756bb4c7b336ca 1 parent 64eab80
Thomas Kluyver authored

Showing 3 changed files with 22 additions and 3 deletions. Show diff stats Hide diff stats

  1. +9 0 setup3.py
  2. +12 2 setupbase.py
  3. +1 1  setupext/__init__.py
9 setup3.py
... ... @@ -0,0 +1,9 @@
  1 +import os.path
  2 +from setuptools import setup
  3 +
  4 +from setupbase import (setup_args, find_scripts, find_packages)
  5 +
  6 +setup_args['entry_points'] = find_scripts(True)
  7 +setup_args['packages'] = find_packages()
  8 +
  9 +setup(use_2to3 = True, **setup_args)
14 setupbase.py
@@ -23,7 +23,10 @@
23 23 import os
24 24 import sys
25 25
26   -from ConfigParser import ConfigParser
  26 +try:
  27 + from configparser import ConfigParser
  28 +except:
  29 + from ConfigParser import ConfigParser
27 30 from distutils.command.build_py import build_py
28 31 from glob import glob
29 32
@@ -40,6 +43,13 @@
40 43 def oscmd(s):
41 44 print(">", s)
42 45 os.system(s)
  46 +
  47 +try:
  48 + execfile
  49 +except NameError:
  50 + def execfile(fname, globs, locs=None):
  51 + locs = locs or globs
  52 + exec(compile(open(fname).read(), fname, "exec"), globs, locs)
43 53
44 54 # A little utility we'll need below, since glob() does NOT allow you to do
45 55 # exclusion on multiple endings!
@@ -58,7 +68,7 @@ def file_doesnt_endwith(test,endings):
58 68 #---------------------------------------------------------------------------
59 69
60 70 # release.py contains version, authors, license, url, keywords, etc.
61   -execfile(pjoin('IPython','core','release.py'))
  71 +execfile(pjoin('IPython','core','release.py'), globals())
62 72
63 73 # Create a dict with the basic information
64 74 # This dict is eventually passed to setup after additional keys are added.
2  setupext/__init__.py
... ... @@ -1,3 +1,3 @@
1 1 # load extended setup modules for distuils
2 2
3   -from install_data_ext import install_data_ext
  3 +from .install_data_ext import install_data_ext

0 comments on commit b9f6e70

Please sign in to comment.
Something went wrong with that request. Please try again.